Automatic sparsity detection implemented as a source-to-source transformation

  • Authors:
  • Ralf Giering;Thomas Kaminski

  • Affiliations:
  • FastOpt, Hamburg, Germany;FastOpt, Hamburg, Germany

  • Venue:
  • ICCS'06 Proceedings of the 6th international conference on Computational Science - Volume Part IV
  • Year:
  • 2006

Quantified Score

Hi-index 0.04

Visualization

Abstract

An implementation of Automatic Sparsity Detection (ASD) as a new source-to-source transformation is presented. Given a code for evaluation of a function, ASD generates code to evaluate the sparsity pattern of the function’s Jacobian by operations on bit-vectors. Similar to Automatic Differentiation (AD), there are forward and reverse modes of ASD. As ASD code has significantly fewer required variables than AD, ASD should be operated in pure mode, i.e. without an evaluation of the underlying function included in the ASD code. In a performance comparison of ASD to AD on five small test problems, ASD is about two orders of magnitude faster than AD. Hence, for a particular class of sparse Jacobians, it is efficient to determine first the sparsity patten via ASD. In a subsequent AD step, this allows to reduce the effective dimension for the evaluation of the Jacobian by avoiding the evaluation of zero elements via a selection of seed matrices according to the sparsity pattern.