Skip to content

feat[next]: key GTFN GPU build folders by the device architecture - #2967

Draft
starkphi wants to merge 2 commits into
GridTools:mainfrom
starkphi:gtfn-gpu-arch-build-context
Draft

starkphi wants to merge 2 commits into
GridTools:mainfrom
starkphi:gtfn-gpu-arch-build-context

Conversation

@starkphi

@starkphi starkphi commented Nov 4, 2026

Copy link
Copy Markdown

Description

GTFN GPU program folders, and the compiledb prototype, are now keyed by the device architecture, as DaCe's already are via compiler.cuda.cuda_arch. Before this, a folder built for another architecture was reused. CPU folder names are unchanged. Also fixes CMakeFactory appending the architecture flag to its own cmake_extra_flags on every call, which changed its fingerprint after the first GPU program.

Requirements

  • All fixes and/or new features come with corresponding tests.
  • Important design decisions have been documented in the appropriate ADR inside the docs/development/ADRs/ folder.

If this PR contains code authored by new contributors please make sure:

  • The PR contains an updated version of the AUTHORS.md file adding the names of all the new contributors.

🤖 Generated with Claude Code

starkphi and others added 2 commits November 4, 2026 16:26
…n flags

`CMakeFactory.__call__` appended `-DCMAKE_CUDA_ARCHITECTURES=...` to
`self.cmake_extra_flags` on every call for a GPU source, so the flag list
grew with each program and the factory's fingerprint changed after the
first call. Through `CompiledbFactory`, which passes its own list when it
is not empty, the same could happen to the factory that names the program
cache folders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The DaCe backend has the device architecture in its build context id via
`compiler.cuda.cuda_arch`; GTFN did not, so a folder built for another
architecture (or without `CUDAARCHS`) was reused. `build_context_id` now
adds the architecture for CUDA/HIP sources, resolved when the program is
compiled, and the compiledb prototype name carries the architecture flag.
CPU folder names are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant