Skip to content

Update utility packages for Accelerate 1.4 #580

Open

Description

@Tjalle-S

I have looked into the necessary updates to ensure the utility packages work with Accelerate 1.4. I have looked only at the packages listed in the Accelerate README.

Overview

  • lens-accelerate: works on master branch, needs major version bump due to re-export of Control.Lens (see also lens dependency tmcdonell/lens-accelerate#1).
  • accelerate-io: works on master branch.
    • Release due to code changes (no API changes):
      • accelerate-io
      • accelerate-io-vector
      • accelerate-io-JuicyPixels
      • accelerate-io-array
    • accelerate-io-bytestring needs release with major version bump (removed equations from type family).
    • Others do not need changes.
  • linear-accelerate needs release (fix in Num instances, already on master). Also need to relax lens upper bound to 6.
  • accelerate-fft: OverloadedStrings language extension required in llvm-cpu codegen, due to change in dependency. Updated in Build with GHC 9.10.3 accelerate-fft#14.
    • Installation instructions would be nice to have, since it requires FFTW to be installed (for the native backend). On Linux (Ubuntu/Mint), this is libfftw3-dev, but I am not sure of the requirements on Windows or Mac. Alternatively, pointing to https://fftw.org/ for installation instructions would work.
  • accelerate-bignum and accelerate-blas use the old llvm-hs-pretty for llvm-cpu codegen. This should be rewritten to use the vendored-in llvm-pretty accelerate fork. I am not familiar enough with the native backend to do this task myself quickly, but I assume this is mostly mechanical.
    • accelerate-bignum additionally has an open pull request which is required.
    • I haven't been able to test, but I assume accelerate-blas also requires system packages to be available, in which case installation instructions would be nice.
  • containers-accelerate builds with the currently published version. However, there are code changes and a pull request to review (no API changes). Publishing these would require a new release.
  • accelerate-examples has an open pull request to work with Accelerate 1.4. It mentions the smvm example not working, likely because it depends on accelerate-io-vector (see above). A revision should be enough to publish these changes.
    • It also mentions the PTX backend not working (might be lacking CUDA support, since hardware is not mentioned).
    • It mentions the remote EKG server not working. This may not be a priority, but should be properly documented.

The following packages already build, with the currently published version (I did not perform additional tests).

  • colour-accelerate
  • mwc-random-acceleate
  • gloss-accelerate
  • gloss-raster-accelerate

Notes

  • I do not have access to a machine that supports CUDA, so I can't check if packages (especially bignum, blas and fft, with custom codegen) work with the ptx backend. It might require rewrites, but I am not sure how much the PTX backend changed.
  • I kept changes minimal to get a working setup with Accelerate 1.4 and GHC 9.10.3. We should discuss other changes that are good practice:
    • We should consider adding upper bounds to prevent failing builds in the future. If no release is needed for other reasons, this only requires a revision. This is currently also a requirement of the PVP.
    • We may want to test where backward compatibility with Accelerate 1.3 can be maintained (and if this is desirable, or if we simply want to set 1.4 as the lower bound).
  • We may want to decide on a core set of packages we wish to maintain, and put these under the AccelerateHS organisation if they aren't already. We may then also want to set up a CI pipeline to check if they still work together.

Activity

  1. tomsmeding commented on Sep 21, 2026

    @tomsmeding
    Member

    I have some additional work that I didn't open a PR for yet:

  2. Tjalle-S commented on Sep 23, 2026

    @Tjalle-S
    ContributorAuthor

    I just checked, and both of these compile together with the other utility packages, and the test suites pass (at least for the llvm-native backend).

  3. tomsmeding commented on Sep 23, 2026

    @tomsmeding
    Member

    I will not be working on the utility packages now or in the near future; do with the code what you will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions