Branch: refs/heads/main
Revision: 0e2e59a
Author: stonea
Link: Embed gpu fatbin file into generated code by stonea · Pull Request #18628 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #18628 from stonea/gpu_bundle_bin
embed generated gpu kernel code into generated executable rather than a separate file
AKA: Embed gpu fatbin file into generated code
This PR reads and store the contents of the generated .fatbin
file into a global string variable called chpl_gpuBinary
. It also modifies Chapel's GPU runtime library to use that variable rather than reading in the .fatbin
file at runtime. This change also has it so we dump the .fatbin file into the temporary directory and have the main process (forked in codegen) responsible for cleaning it up.
[Reviewed by @mppf] Thanks!
Modified Files:
A compiler/next/include/chpl/util/filesystem.h
M compiler/codegen/cg-expr.cpp
M compiler/codegen/codegen.cpp
M compiler/include/files.h
M compiler/main/driver.cpp
M compiler/util/files.cpp
M compiler/util/misc.cpp
M runtime/include/chpl-gpu.h
M runtime/src/chpl-gpu.c
Compare: https://github.com/chapel-lang/chapel/compare/d8a0fe5c1ec5...0e2e59ada126