Searching for compile option in binary

Is there a way to see the compilation options in a binary file? Specifically, I want to know if the “bypassing L1” option, dlcm, is added in the file.

I do not know whether nvcc deposits a full copy of the compilation switches in an ELF comment record of executables. You could trycuobjdump --dump-elf to check whether the information of interest makes an appearance in any of the ELF sections it dumps.

-dlcm controls the generation of load instructions, and this should be visible in the embedded PTX if there is any. In particular, look at the .cop field of ld instructions. Please refer to sections 9.7.8.8. and 9.7.8.9. of the current PTX documentation.

Whether any of the .cop information is actually visible at machine code (SASS) level will depend on the cache hierarchy for a particular compute capability. Some of the PTX-level options may be not applicable at the SASS level. You may want to run some experiments to see how particular PTX ld instruction variants translate into SASS.