Skip to content

Add TCNN_HALF_PRECISION definition to RTC-kernel#529

Merged
Tom94 merged 2 commits into
NVlabs:masterfrom
julcst:fix-jit-half
Dec 14, 2025
Merged

Add TCNN_HALF_PRECISION definition to RTC-kernel#529
Tom94 merged 2 commits into
NVlabs:masterfrom
julcst:fix-jit-half

Conversation

@julcst

@julcst julcst commented Dec 14, 2025

Copy link
Copy Markdown
Contributor

Fixes #528

Copilot AI review requested due to automatic review settings December 14, 2025 17:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes issue #528 by adding the TCNN_HALF_PRECISION macro definition to runtime-compiled CUDA kernels. The generated RTC kernels include common.h (via common_device.h in the preamble), which has a compile-time check requiring TCNN_HALF_PRECISION to be defined. Without this definition, the RTC compilation would fail.

Key Changes:

  • Added #define TCNN_HALF_PRECISION {TCNN_HALF_PRECISION} to the kernel template before any includes
  • Added the corresponding named argument "TCNN_HALF_PRECISION"_a = TCNN_HALF_PRECISION to the dfmt call

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@julcst julcst changed the title Add TCNN_HALF_PRECISION definition to kernel Add TCNN_HALF_PRECISION definition to RTC-kernel Dec 14, 2025
@Tom94

Tom94 commented Dec 14, 2025

Copy link
Copy Markdown
Contributor

Thanks! I made a minor adjustment before merging (moved the definition to opts rather than being explicit in code); let me know if this doesn't work on your end. Currently travelling and don't have a system to test on.

@Tom94 Tom94 merged commit 2e757bb into NVlabs:master Dec 14, 2025
18 checks passed
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.

Error in JIT-compile: TCNN_HALF_PRECISION not defined in JIT-kernel

3 participants