Skip to content

Made it possible to disable GPU detection#2424

Open
philip-paul-mueller wants to merge 10 commits into
spcl:mainfrom
philip-paul-mueller:block_probing_for_gpu_with_test_program
Open

Made it possible to disable GPU detection#2424
philip-paul-mueller wants to merge 10 commits into
spcl:mainfrom
philip-paul-mueller:block_probing_for_gpu_with_test_program

Conversation

@philip-paul-mueller

@philip-paul-mueller philip-paul-mueller commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Currently DaCe will always compile and run a test program to determine the CUDA/HIP architecture.
This is problematic because this will create a CUDA-Context and prevents parallel compilations.

This PR changes this by changing the meaning of compiler.cuda.{hip,cuda}_archs.
Before they were the additional architectures to compile for, since they carried a value, in the case for CUDA the value was 60, we would always compile for two architectures the one that was detected and for 60.
The new meaning of these keys are "the architectures we want to compile for" and if they are empty, the current default, the architecture is auto detected.

Also the auto detection changed.
Before a test program was compiled to probe for the architecture.
The auto detection for CUDA was switched to native, i.e. the compiler does it itself.
However, this does not work for HIP thus the program is retained.

@philip-paul-mueller philip-paul-mueller marked this pull request as ready for review July 3, 2026 10:18
Comment thread dace/config_schema.yml Outdated
Comment thread dace/config_schema.yml
@philip-paul-mueller

Copy link
Copy Markdown
Collaborator Author

cscs-ci run

havogt added a commit to havogt/gt4py that referenced this pull request Jul 7, 2026
- CompileJob -> LoadTask (a task yielding a loaded ExecutableProgram),
  with fields run -> compile_and_load and offload -> compilation
- OffloadableWork -> CompilationTask (the decomposed part producing the
  CompilationArtifact), matching the compile/load vocabulary of the
  artifact split
- CompilationRunner -> Runner
- modules: compilation_runner.py -> runners.py, compile_jobs.py ->
  load_tasks.py (make_compile_job -> make_load_task)
- TODO on the worker initializer for spcl/dace#2424 (scope of the
  CUDAARCHS workaround)
- sharpen the connectivity-registry comment (main-process only, shared
  across the tasks of a run)
havogt added a commit to havogt/gt4py that referenced this pull request Jul 7, 2026
Workers need the architecture from CUDAARCHS for any GPU build as long
as they cannot query a device — spcl/dace#2424 only changes how the
value is passed to dace, which is already marked in set_dace_config.

@ThrudPrimrose ThrudPrimrose left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the changes

@edopao edopao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions

Comment thread dace/config_schema.yml Outdated
Comment thread dace/config_schema.yml Outdated
philip-paul-mueller and others added 2 commits July 7, 2026 14:19
Co-authored-by: Edoardo Paone <edoardo16@gmail.com>
Co-authored-by: Edoardo Paone <edoardo16@gmail.com>

@tbennun tbennun left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to also change setup.py: https://github.com/spcl/dace/blob/main/setup.py#L35
for the minimum cmake version required
Otherwise lgtm

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.

4 participants