Skip to content

Commit

Permalink
Ensure better compiler cache results between cudf cal-ver branches (#…
Browse files Browse the repository at this point in the history
…11835)

By passing the CUDF_VERSION compile definition only to the single source that needs it, we can remove compiler cache misses when switching between branches with different cal-ver values.

Authors:
  - Robert Maynard (https://github.com/robertmaynard)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Karthikeyan (https://github.com/karthikeyann)

URL: #11835
  • Loading branch information
robertmaynard authored Oct 25, 2022
1 parent 285cb9e commit a37f27b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,15 @@ target_compile_definitions(
# Disable Jitify log printing. See https://github.com/NVIDIA/jitify/issues/79
target_compile_definitions(cudf PRIVATE "JITIFY_PRINT_LOG=0")

# Instruct jitify to use the kernel JIT cache
if(JITIFY_USE_CACHE)
target_compile_definitions(cudf PUBLIC JITIFY_USE_CACHE "CUDF_VERSION=${PROJECT_VERSION}")
# Instruct src/jit/cache what version of cudf we are building so it can compute a cal-ver cache
# directory. We isolate this definition to the single source so it doesn't effect compiling
# caching for all of libcudf
set_property(
SOURCE src/jit/cache.cpp
APPEND
PROPERTY COMPILE_DEFINITIONS "JITIFY_USE_CACHE" "CUDF_VERSION=${PROJECT_VERSION}"
)
endif()

# Per-thread default stream
Expand Down

0 comments on commit a37f27b

Please sign in to comment.