Skip to content
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 CUDA intermediate files with a reproducible name #493

Open
fwyzard opened this issue Jun 19, 2020 · 0 comments
Open

Build CUDA intermediate files with a reproducible name #493

fwyzard opened this issue Jun 19, 2020 · 0 comments

Comments

@fwyzard
Copy link

fwyzard commented Jun 19, 2020

By default, intermediate files built by nvcc -dc and nvcc -dlink are stored in a temporary directory and have a randomly generated name, e.g.

/tmp/tmpxft_00031a01_00000000-6_kernels.cpp1.ii

These file names are then used to generate unique symbols names, e.g.

T __cudaRegisterLinkedBinary_42_tmpxft_00031a01_00000000_6_kernels_cpp1_ii_478d4aee

and so end up influencing the final binaries.

Experimenting with nvcc, it seems that this can be avoided using the -keep -keep-dir $TEMP_DIR options: in this case the temporary names are relative to the TEMP_DIR directory, and so depend only on the compilation target name, and should remain unchanged across recompilation.

Depending how scram invokes nvcc, a possibility could be to pass the options -keep -keep-dir $CMSSW_BASE/tmp/$SCRAM_ARCH (or a dedicated subdirectory).

@fwyzard fwyzard changed the title Build CUDA intermediate files with a reproducible bame Build CUDA intermediate files with a reproducible name Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant