Skip to content

Set CUDA_COMPUTE_CAPABILITY #1

@yanqswhu

Description

@yanqswhu

Maybe it is not a good idea to set CUDA_COMPUTE_CAPABILITY manually, which may lead to some unexpected errors.

I change the code in CMake from

### CUDA CHECK 
find_package(CUDA REQUIRED)
set(CUDA_COMPUTE_CAPABILITY "52")
set(CUDA_GENERATE_CODE "arch=compute_${CUDA_COMPUTE_CAPABILITY},code=sm_${CUDA_COMPUTE_CAPABILITY}" CACHE STRING "Which GPU architectures to generate code for (each arch/code pair will be passed as --generate-code option to nvcc, separate multiple pairs by ;)")
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -arch compute_${CUDA_COMPUTE_CAPABILITY})

to

find_package(CUDA REQUIRED)

I tested this code and works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions