-
Notifications
You must be signed in to change notification settings - Fork 58
build: bump dace version #2773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: bump dace version #2773
Changes from all commits
fb1369b
652786f
39591eb
d46fadd
7c59e26
f2b0dab
5839ef1
1deee35
d23b086
6d9c0e2
7761048
5bbb0c2
0659535
5a6ca3a
f161b9f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -596,8 +596,6 @@ def keep_line(line: str) -> bool: | |
| line = line.strip() | ||
| if line == '#include "../../include/hash.h"': | ||
| return False | ||
| if line.startswith("DACE_EXPORTED") and line.endswith(");"): | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @romanc @FlorianDeconinck If you prefer, I can just keep the export line for
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for tracking this down for us. For me, this looks good. we might get a bunch of warnings for unused things, but it's better to have warnings than to crash. We can clean this up in follow-up PRs. |
||
| return False | ||
| if line == "#include <cuda_runtime.h>": | ||
| return False | ||
| return True | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Root Cause Analysis
The bug is in
DaCeComputationCodegen._postprocess_dace_codeat src/gt4py/cartesian/backend/dace_backend.py:599-600.What happens
The GT4Py DaCe GPU backend merges DaCe's separately-generated Frame (.cpp) and CUDA (.cu) code objects into a single computation.hpp. The
keep_linefilter (dace_backend.py:595-603) strips allDACE_EXPORTED … );forward declarations, on the assumption that every declaration's definition also lives in the merged file and appears before any use:That assumption is violated by
__dace_gpu_drain_error. DaCe's CUDA code generator (dace/codegen/targets/cuda.py) emits, in order:DACE_EXPORTED void __dace_gpu_drain_error(...);(cuda.py:421)__dace_init_cudadefinition, which calls__dace_gpu_drain_error(__state);before the GPU context exists (cuda.py:454)__dace_gpu_drain_errordefinition (cuda.py:503)