Skip to content

Commit c675a9f

Browse files
committed
cuda_device_id → gpu_device_id
1 parent 8000759 commit c675a9f

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

include/cufinufft_opts.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ typedef struct cufinufft_opts { // see cufinufft_default_opts() for defaults
2121

2222
int gpu_spreadinterponly; // 0: NUFFT, 1: spread or interpolation only
2323

24-
/* multi-gpu support */
25-
int cuda_device_id;
24+
/* multi-gpu support */
25+
int gpu_device_id;
2626
} cufinufft_opts;
2727

2828
#endif

python/cufinufft/_cufinufft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _get_NufftOpts():
8989
('gpu_nstreams', c_int),
9090
('gpu_kerevalmeth', c_int),
9191
('gpu_spreadinterponly', c_int),
92-
('cuda_device_id', c_int)]
92+
('gpu_device_id', c_int)]
9393
return fields
9494

9595

src/cufinufft.cu

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ int CUFINUFFT_MAKEPLAN(int type, int dim, int *nmodes, int iflag,
106106
// 0 by default
107107
cudaSetDevice(0);
108108
} else {
109-
cudaSetDevice(opts->cuda_device_id);
109+
cudaSetDevice(opts->gpu_device_id);
110110
}
111111

112112
cudaEvent_t start, stop;
@@ -307,7 +307,7 @@ int CUFINUFFT_SETPTS(int M, FLT* d_kx, FLT* d_ky, FLT* d_kz, int N, FLT *d_s,
307307
*/
308308
{
309309
// Mult-GPU support: set the CUDA Device ID:
310-
cudaSetDevice(d_plan->opts.cuda_device_id);
310+
cudaSetDevice(d_plan->opts.gpu_device_id);
311311

312312

313313
int nf1 = d_plan->nf1;
@@ -456,7 +456,7 @@ int CUFINUFFT_EXECUTE(CUCPX* d_c, CUCPX* d_fk, CUFINUFFT_PLAN d_plan)
456456
*/
457457
{
458458
// Mult-GPU support: set the CUDA Device ID:
459-
cudaSetDevice(d_plan->opts.cuda_device_id);
459+
cudaSetDevice(d_plan->opts.gpu_device_id);
460460

461461
int ier;
462462
int type=d_plan->type;
@@ -507,7 +507,7 @@ int CUFINUFFT_DESTROY(CUFINUFFT_PLAN d_plan)
507507
*/
508508
{
509509
// Mult-GPU support: set the CUDA Device ID:
510-
cudaSetDevice(d_plan->opts.cuda_device_id);
510+
cudaSetDevice(d_plan->opts.gpu_device_id);
511511

512512
cudaEvent_t start, stop;
513513
cudaEventCreate(&start);
@@ -631,7 +631,7 @@ int CUFINUFFT_DEFAULT_OPTS(int type, int dim, cufinufft_opts *opts)
631631
}
632632

633633
// By default, only use device 0
634-
opts->cuda_device_id = 0;
634+
opts->gpu_device_id = 0;
635635

636636
return 0;
637637
}

src/memtransfer_wrapper.cu

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ int ALLOCGPUMEM2D_PLAN(CUFINUFFT_PLAN d_plan)
1515
*/
1616
{
1717
// Mult-GPU support: set the CUDA Device ID:
18-
cudaSetDevice(d_plan->opts.cuda_device_id);
18+
cudaSetDevice(d_plan->opts.gpu_device_id);
1919

2020
int nf1 = d_plan->nf1;
2121
int nf2 = d_plan->nf2;
@@ -101,7 +101,7 @@ int ALLOCGPUMEM2D_NUPTS(CUFINUFFT_PLAN d_plan)
101101
*/
102102
{
103103
// Mult-GPU support: set the CUDA Device ID:
104-
cudaSetDevice(d_plan->opts.cuda_device_id);
104+
cudaSetDevice(d_plan->opts.gpu_device_id);
105105

106106
int M = d_plan->M;
107107
//int maxbatchsize = d_plan->maxbatchsize;
@@ -139,7 +139,7 @@ void FREEGPUMEMORY2D(CUFINUFFT_PLAN d_plan)
139139
*/
140140
{
141141
// Mult-GPU support: set the CUDA Device ID:
142-
cudaSetDevice(d_plan->opts.cuda_device_id);
142+
cudaSetDevice(d_plan->opts.gpu_device_id);
143143

144144
if(!d_plan->opts.gpu_spreadinterponly){
145145
checkCudaErrors(cudaFree(d_plan->fw));
@@ -212,7 +212,7 @@ int ALLOCGPUMEM3D_PLAN(CUFINUFFT_PLAN d_plan)
212212
*/
213213
{
214214
// Mult-GPU support: set the CUDA Device ID:
215-
cudaSetDevice(d_plan->opts.cuda_device_id);
215+
cudaSetDevice(d_plan->opts.gpu_device_id);
216216

217217
//int ms = d_plan->ms;
218218
//int mt = d_plan->mt;
@@ -308,7 +308,7 @@ int ALLOCGPUMEM3D_NUPTS(CUFINUFFT_PLAN d_plan)
308308
*/
309309
{
310310
// Mult-GPU support: set the CUDA Device ID:
311-
cudaSetDevice(d_plan->opts.cuda_device_id);
311+
cudaSetDevice(d_plan->opts.gpu_device_id);
312312

313313
int M = d_plan->M;
314314
// int maxbatchsize = d_plan->maxbatchsize;
@@ -350,7 +350,7 @@ void FREEGPUMEMORY3D(CUFINUFFT_PLAN d_plan)
350350
*/
351351
{
352352
// Mult-GPU support: set the CUDA Device ID:
353-
cudaSetDevice(d_plan->opts.cuda_device_id);
353+
cudaSetDevice(d_plan->opts.gpu_device_id);
354354

355355

356356
if(!d_plan->opts.gpu_spreadinterponly){

0 commit comments

Comments
 (0)