Skip to content

Commit

Permalink
Merge pull request #8235 from leofang/jitify_warning
Browse files Browse the repository at this point in the history
Various Jitify improvements
  • Loading branch information
kmaehashi committed Mar 12, 2024
2 parents 8fb6d04 + 3d63430 commit 194aab1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cupy/cuda/jitify.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import json
import os
import re
import tempfile
import warnings

from cupy._environment import get_cuda_path
from cupy.cuda import cub
from cupy import _util


###############################################################################
Expand Down Expand Up @@ -186,6 +188,12 @@ cdef inline void _init_cupy_headers_from_scratch() except*:
# Same for tuple
cupy_headers[b"tuple"] = b"#include <cupy/cuda_workaround.h>\n"

# Ensure users know this is normal and not hanging...
warnings.warn(
"Jitify is performing a one-time only warm-up to populate the "
"persistent cache, this may take a few seconds and will be improved "
"in a future release...", _util.PerformanceWarning)

# Compile a dummy kernel to further populate the cache (with bundled
# headers)
# need to defer import to avoid circular dependency
Expand Down
2 changes: 2 additions & 0 deletions install/cupy_builder/cupy_setup_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ def make_extensions(ctx: Context, compiler, use_cython):
if module['name'] == 'jitify':
# this fixes RTD (no_cuda) builds...
compile_args.append('--std=c++11')
# suppress printing Jitify logging to stdout
compile_args.append('-DJITIFY_PRINT_LOG=0')
# Uncomment to diagnose Jitify issues.
# compile_args.append('-DJITIFY_PRINT_ALL')

Expand Down

0 comments on commit 194aab1

Please sign in to comment.