mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-04 04:07:22 +00:00
Change CMAKE_CUDA_STANDARD to C++17 for Windows GPU build (#7883)
This commit is contained in:
parent
a9f7eef754
commit
38ca0f4839
3 changed files with 8 additions and 5 deletions
|
|
@ -1385,8 +1385,11 @@ if (onnxruntime_USE_CUDA)
|
|||
endif()
|
||||
enable_language(CUDA)
|
||||
message( STATUS "CMAKE_CUDA_COMPILER_VERSION: ${CMAKE_CUDA_COMPILER_VERSION}")
|
||||
|
||||
set(CMAKE_CUDA_STANDARD 14)
|
||||
if (WIN32)
|
||||
set(CMAKE_CUDA_STANDARD 17)
|
||||
else()
|
||||
set(CMAKE_CUDA_STANDARD 14)
|
||||
endif()
|
||||
file(TO_CMAKE_PATH ${onnxruntime_CUDNN_HOME} onnxruntime_CUDNN_HOME)
|
||||
set(ONNXRUNTIME_CUDA_LIBRARIES ${CUDA_LIBRARIES})
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ constexpr const char* UpsampleModeCubic = "cubic";
|
|||
// is a 4x4 matrix
|
||||
const size_t CubicModeGridLength = 4;
|
||||
|
||||
using GetNearestPixelFunc = std::function<int64_t(float, bool)>;
|
||||
using GetOriginalCoordinateFunc = std::function<float(float, float, float, float, float, float)>;
|
||||
using GetNearestPixelFunc = int64_t(*)(float, bool);
|
||||
using GetOriginalCoordinateFunc = float (*)(float, float, float, float, float, float);
|
||||
|
||||
enum UpsampleMode {
|
||||
NN = 0, // nearest neighbour
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ class CUDAExecutionProvider : public IExecutionProvider {
|
|||
p.reset();
|
||||
});
|
||||
}
|
||||
std::shared_ptr<PerThreadContextMap> p{std::make_shared<PerThreadContextMap>()};
|
||||
std::shared_ptr<PerThreadContextMap> p = std::make_shared<PerThreadContextMap>();
|
||||
};
|
||||
|
||||
static const std::shared_ptr<PerThreadContextMap>& PerThreadContextCache() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue