Skip to content

Commit b4eb4a0

Browse files
committed
solved auto detection of GPU arch
1 parent cb81cdd commit b4eb4a0

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.15...3.27)
1+
cmake_minimum_required(VERSION 3.18...3.27)
22
project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES CXX)
33

44
# General settings
@@ -9,7 +9,6 @@ include(CheckLanguage)
99
check_language(CUDA)
1010

1111
if(CMAKE_CUDA_COMPILER)
12-
set(CMAKE_CUDA_ARCHITECTURES "native")
1312
enable_language(CUDA)
1413

1514
add_definitions(-DWITH_CUDA)
@@ -22,6 +21,7 @@ if(CMAKE_CUDA_COMPILER)
2221
message(STATUS "CMAKE_CUDA_COMPILER = ${CMAKE_CUDA_COMPILER}")
2322
message(STATUS "CMAKE_CUDA_COMPILER_ID = ${CMAKE_CUDA_COMPILER_ID}")
2423
message(STATUS "CMAKE_CUDA_COMPILER_VERSION = ${CUDA_V}")
24+
2525
else()
2626
message(STATUS "NO CUDA INSTALLATION FOUND, INSTALLING CPU VERSION ONLY!")
2727
# execute_process(COMMAND ${Python_EXECUTABLE} -m pip uninstall -y torch)

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ torchmcubes: marching cubes for PyTorch
1212
- Python (3.9 or later)
1313
- NumPy (1.x is preferable)
1414
- PyTorch
15+
- cmake (3.18 or later)
16+
17+
Make sure that you have nvcc CUDA compiler
18+
19+
```shell
20+
nvcc --version
21+
```
22+
23+
If you have CUDA installed but not able to run nvcc, you migth need to add it to your path:
24+
25+
```shell
26+
export CUDA_HOME=/usr/local/cuda/
27+
export PATH=$CUDA_HOME/bin:$PATH
28+
```
29+
1530

1631
### Pip installation
1732

0 commit comments

Comments
 (0)