Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3e209a

Browse files
author
Martin Winter
committed
Linux build fixes
1 parent c4325e6 commit e3e209a

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ install_manifest.txt
99
compile_commands.json
1010
CTestTestfile.cmake
1111
_deps
12+
build

15_GraphAPI/src/main.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ cudaGraphExec_t buildGraphForParallelTasks(unsigned int numTasks)
8686

8787
// Create a node for each kernel in the graph, with grid config and parameters
8888
std::vector<cudaGraphNode_t> nodes(numTasks);
89-
cudaKernelNodeParams params = { busy, {1,1,1}, {1,1,1}, 0, nullptr, nullptr };
89+
cudaKernelNodeParams params = { reinterpret_cast<void*>(busy), {1,1,1}, {1,1,1}, 0, nullptr, nullptr };
9090

9191
// Add them to the graph. This simple setup has no dependencies, passing nullptr
9292
for (int i = 0; i < numTasks; i++)

16_TensorCores/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ if(${ITS_ARCH_FOUND})
1515
../shared/include/utility.h
1616
)
1717
target_include_directories(16_TensorCores PRIVATE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
18-
target_link_libraries(16_TensorCores cublas.lib)
18+
if (MSVC)
19+
target_link_libraries(16_TensorCores cublas.lib)
20+
else()
21+
target_link_libraries(16_TensorCores cublas)
22+
endif()
1923
else()
2024
message("Not building sample 16 - CMAKE_CUDA_ARCHITECTURES do not include ITS support (>=70)")
2125
message("To define more than one architecture, separate them with semicolon (e.g., 60;70)")

shared/include/utility.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <random>
66
#include <iostream>
77
#include <vector>
8+
#include <algorithm>
89
#include <cuda_runtime_api.h>
910
#include <mma.h>
1011

0 commit comments

Comments
 (0)