Skip to content

Enable runtime resolution of CUDA header path for NVRTC#3252

Draft
fheinecke wants to merge 2 commits into
NVIDIA:mainfrom
fheinecke:fred/nvrtc-runtime-header-resolution-1
Draft

Enable runtime resolution of CUDA header path for NVRTC#3252
fheinecke wants to merge 2 commits into
NVIDIA:mainfrom
fheinecke:fred/nvrtc-runtime-header-resolution-1

Conversation

@fheinecke

Copy link
Copy Markdown
Collaborator

Description

NVRTC relies on having CUDA toolkit headers available at runtime for JIT compilation. The following directories are searched:

  1. ${NVTE_CUDA_INCLUDE_DIR}
  2. ${CUDA_HOME}
  3. ${CUDA_DIR}
  4. The build-time header path
  5. /usr/local/cuda

The build-time path may coincidentally line up with the runtime path, but may be incorrect when building TE on another machine or environment, or when building TE with build isolation enabled. This enables searching site-packages at runtime for the headers, allowing them to be resolved in more environments. If checked paths don't exist, then this will fall back to the existing behavior.

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Please list the changes introduced in this PR:

  • Enable runtime resolution of CUDA toolkit headers in site-packages for NVRTC

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
@fheinecke

Copy link
Copy Markdown
Collaborator Author

/te-ci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant