Skip to content

Commit

Permalink
Set CUDA arches in a-b-c
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstenhater committed Jan 15, 2025
1 parent da3dbdc commit 11b330d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions modcc/printer/gpuprinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ void emit_api_body_cu(std::ostream& out, APIMethod* e, const ApiFlags& flags) {
// update an indexed variable, like current or conductance.
// This is the case if one of the external variables "is_write".
auto it = std::find_if(indexed_vars.begin(), indexed_vars.end(),
[](auto& sym){return sym->external_variable()->is_write();});
if (it!=indexed_vars.end()) {
out << "unsigned lane_mask_ = arb::gpu::ballot(arb::gpu::active_mask(), tid_<n_);\n";
[](auto& sym){return sym->external_variable()->is_write();});
if (it != indexed_vars.end()) {
out << "unsigned lane_mask_ = arb::gpu::ballot(0xffffffff, tid_<n_);\n";
}
}
if (flags.ppack_iface) out << "PPACK_IFACE_BLOCK;\n";
Expand Down
5 changes: 4 additions & 1 deletion scripts/arbor-build-catalogue
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,13 @@ if gpu == "cuda":
include(FindCUDAToolkit)
add_compile_definitions(ARB_CUDA)
add_compile_definitions(ARB_HAVE_GPU)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
# Pascal, Volta, Ampere, Hopper
set(CMAKE_CUDA_ARCHITECTURES 60 70 80 90)
endif()
find_package(CUDAToolkit)
enable_language(CUDA)
set(CMAKE_CUDA_STANDARD 20)
set(CMAKE_CUDA_HOST_COMPILER {args["cxx"]})
"""
elif gpu == "cuda-clang":
Expand Down

0 comments on commit 11b330d

Please sign in to comment.