Skip to content

Commit 38e50ed

Browse files
committed
feat(cmake): expose TCNN_HALF_PRECISION to parent
1 parent 8394910 commit 38e50ed

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright (c) 2020-2025, NVIDIA CORPORATION. All rights reserved.
2-
#
2+
#
33
# Redistribution and use in source and binary forms, with or without modification, are permitted
44
# provided that the following conditions are met:
55
# * Redistributions of source code must retain the above copyright notice, this list of
@@ -10,7 +10,7 @@
1010
# * Neither the name of the NVIDIA CORPORATION nor the names of its contributors may be used
1111
# to endorse or promote products derived from this software without specific prior written
1212
# permission.
13-
#
13+
#
1414
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
1515
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1616
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE
@@ -221,6 +221,7 @@ message(STATUS "Targeting CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
221221
if (TCNN_HAS_PARENT)
222222
set(TCNN_CUDA_ARCHITECTURES ${CMAKE_CUDA_ARCHITECTURES} PARENT_SCOPE)
223223
set(TCNN_CUDA_VERSION ${CUDA_VERSION} PARENT_SCOPE)
224+
set(TCNN_HALF_PRECISION ${TCNN_HALF_PRECISION} PARENT_SCOPE)
224225
endif()
225226

226227
if (MIN_GPU_ARCH LESS_EQUAL 70)

dependencies/cuda-cmake-github-actions/scripts/actions/install_cuda_windows.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ $CUDA_PACKAGES_IN = @(
5555
"cudart";
5656
)
5757

58-
5958
## -------------------
6059
## Select CUDA version
6160
## -------------------

include/tiny-cuda-nn/gpu_memory.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ inline GPUMemoryArena::Allocation allocate_workspace(cudaStream_t stream, size_t
695695
if (!arena) {
696696
arena = std::make_shared<GPUMemoryArena>();
697697
}
698+
698699
return GPUMemoryArena::Allocation{stream, arena->allocate(n_bytes), arena};
699700
}
700701

scripts/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22

33
# Copyright (c) 2020-2025, NVIDIA CORPORATION. All rights reserved.
4-
#
4+
#
55
# Redistribution and use in source and binary forms, with or without modification, are permitted
66
# provided that the following conditions are met:
77
# * Redistributions of source code must retain the above copyright notice, this list of
@@ -12,7 +12,7 @@
1212
# * Neither the name of the NVIDIA CORPORATION nor the names of its contributors may be used
1313
# to endorse or promote products derived from this software without specific prior written
1414
# permission.
15-
#
15+
#
1616
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
1717
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1818
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE

src/rtc_kernel.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ CudaRtcKernel::CudaRtcKernel(const std::string& name, const std::string& kernel_
122122

123123
ScopeGuard cleanup_guard{[&]() { clear(); }};
124124

125-
auto start_time = std::chrono::steady_clock::now();
125+
const auto start_time = std::chrono::steady_clock::now();
126126

127127
uint32_t cc = cuda_supported_compute_capability();
128128

0 commit comments

Comments
 (0)