Skip to content

Commit e6b3997

Browse files
committed
compile for more GPUs
1 parent 32cb7a5 commit e6b3997

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ find_package(OpenMP REQUIRED)
1111
find_package(Boost COMPONENTS program_options log log_setup REQUIRED)
1212
# FindCUDA module
1313
find_package(CUDA)
14+
# find_package(CUDAToolkit)
1415
# Find TBB
1516
find_package(TBB REQUIRED)
1617

@@ -24,7 +25,9 @@ if(CUDA_FOUND)
2425
# Set CUDA architecture (change according to your GPU)
2526
# set(CUDA_ARCH "-arch=sm_75" CACHE STRING "CUDA architecture")
2627
# set_property(TARGET ${target} PROPERTY CUDA_ARCHITECTURES native)
27-
set_property(TARGET ${target} PROPERTY CUDA_ARCHITECTURES 70 75 80 86 90)
28+
# set_property(TARGET ${target} PROPERTY CUDA_ARCHITECTURES 70 75 80 86 90)
29+
set(CMAKE_CUDA_ARCHITECTURES 60 61 62 70 72 75 86)
30+
# set_property(TARGET ${target} PROPERTY CUDA_SEPARABLE_COMPILATION ON)
2831
# Add CUDA and OpenMP flags
2932
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${CUDA_ARCH} -Xcompiler=${OpenMP_CXX_FLAGS}")
3033
else()

src/spinwalk.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ bool run(simulation_parameters param, std::map<std::string, std::vector<std::str
180180
param_local.scale2grid[i] = param_local.fieldmap_size[i] / param_local.fov[i];
181181
for (int n = 0; n < param.n_tissue_type; n++)
182182
{
183-
double min_convergence = 0.95 * param.diffusivity[n] * sqrt(1.0 * param.n_timepoints); // https://submissions.mirasmart.com/ISMRM2024/Itinerary/PresentationDetail.aspx?evdid=4684
183+
double min_convergence = 0.95 * param.diffusivity[n] * sqrt(1.0 * param.TE_us[param.n_TE-2]); // https://submissions.mirasmart.com/ISMRM2024/Itinerary/PresentationDetail.aspx?evdid=4684
184184
if(param_local.fov[i] < min_convergence )
185185
{
186186
BOOST_LOG_TRIVIAL(error) << "Virtual FoV (= " << param_local.fov[i] << ") is smaller than minimum convergence length (= " << min_convergence << ")!";

0 commit comments

Comments
 (0)