-
- Downloads
Fix long kernel names creating too long dir/filenames
If the kernel (mangled) symbol name is longer than the allowed directory name, there was a crash due to the temporary file / kernel cache directory structure having the name as one of the directory levels. Since long names are common with kernels generated from C++ templates, this issue is likely to occur often when kernels are originating from C++ APIs such as CUDA/HIP or SYCL. The limit seems to be 255 in most Linux file systems. A simple fix was to shorten the directory name and appending a hash when needed. We still keep as much of the kernel name in the beginning of the name as feasible to maintain easy location of the temporary bitcodes and binaries when debugging the kernel compiler. Fixes #1190. Also rename POCL_FILENAME_LENGTH to a more descriptive (given how it's been used so far) POCL_MAX_PATHNAME_LENGTH.
Showing
- CHANGES 3 additions, 0 deletionsCHANGES
- include/pocl.h 5 additions, 1 deletioninclude/pocl.h
- lib/CL/clCreateProgramWithBinary.c 1 addition, 1 deletionlib/CL/clCreateProgramWithBinary.c
- lib/CL/clCreateProgramWithIL.c 1 addition, 1 deletionlib/CL/clCreateProgramWithIL.c
- lib/CL/devices/almaif/AlmaIFDevice.cc 7 additions, 6 deletionslib/CL/devices/almaif/AlmaIFDevice.cc
- lib/CL/devices/almaif/openasip/AlmaifCompileTCE.cc 28 additions, 25 deletionslib/CL/devices/almaif/openasip/AlmaifCompileTCE.cc
- lib/CL/devices/almaif/openasip/TTASimDevice.cc 1 addition, 1 deletionlib/CL/devices/almaif/openasip/TTASimDevice.cc
- lib/CL/devices/common.c 16 additions, 12 deletionslib/CL/devices/common.c
- lib/CL/devices/common_driver.c 5 additions, 5 deletionslib/CL/devices/common_driver.c
- lib/CL/devices/cuda/pocl-cuda.c 4 additions, 4 deletionslib/CL/devices/cuda/pocl-cuda.c
- lib/CL/devices/hsa/pocl-hsa.c 5 additions, 5 deletionslib/CL/devices/hsa/pocl-hsa.c
- lib/CL/devices/level0/level0-driver.cc 1 addition, 1 deletionlib/CL/devices/level0/level0-driver.cc
- lib/CL/devices/level0/pocl-level0.cc 17 additions, 17 deletionslib/CL/devices/level0/pocl-level0.cc
- lib/CL/devices/proxy/pocl_proxy.c 8 additions, 8 deletionslib/CL/devices/proxy/pocl_proxy.c
- lib/CL/devices/signal_handlers.c 1 addition, 1 deletionlib/CL/devices/signal_handlers.c
- lib/CL/devices/tce/tce_common.cc 5 additions, 5 deletionslib/CL/devices/tce/tce_common.cc
- lib/CL/devices/vulkan/pocl-vulkan.c 25 additions, 25 deletionslib/CL/devices/vulkan/pocl-vulkan.c
- lib/CL/pocl_binary.c 7 additions, 7 deletionslib/CL/pocl_binary.c
- lib/CL/pocl_cache.c 132 additions, 65 deletionslib/CL/pocl_cache.c
- lib/CL/pocl_file_util.c 8 additions, 8 deletionslib/CL/pocl_file_util.c
Loading
Please register or sign in to comment