Expand description
The source directory of the kernel debug data. The compile directory of the kernel debug data, found when a kernel compiles.
file!() gives a path relative to the rustc working directory, usually the workspace root.
A debugger or a profiler finds such a file only when it runs in that directory. The binary
keeps the relative path, so --remap-path-prefix and trim-paths apply to it. When a kernel
compiles, cubecl looks for the file, and gives the directory that contains it to the debug
data. Thus only the debug data of the kernel has the absolute path, on the computer that has
the source.
If no directory has the files, and the kernel has their text (Full), cubecl can write the
text into the source cache (CUBECL_SOURCE_CACHE) and give that directory.
The search occurs one time for each file in each process, not for each kernel.
Constants§
- SOURCE_
ROOT_ VAR - The variable that names the root, for a binary that does not run in its source tree.
Functions§
- kernel_
source_ root - The directory for the relative source paths of a kernel with the debug data
debug.md5sare the MD5s of the texts that the kernel has (source_md5s). A file with an MD5 matches only a file with the same text. - md5_hex
- The MD5 of
text, in lowercase hexadecimal. - source_
md5s - The MD5 of the source text of each file of a kernel at
level, by the path of the file. Empty belowDebugInfo::Full, as the macro records the texts only atFull.