@@ -444,8 +444,7 @@ class EddyInputSpec(FSLCommandInputSpec):
444444 desc = "Matrix that specifies the relative locations of "
445445 "the field specified by --field and first volume "
446446 "in file --imain" )
447- use_gpu = traits .Str (desc = "Run eddy using gpu, possible values are "
448- "[openmp] or [cuda]" )
447+ use_cuda = traits .Bool (False , desc = "Run eddy using cuda gpu" )
449448
450449
451450class EddyOutputSpec (TraitedSpec ):
@@ -483,7 +482,7 @@ class Eddy(FSLCommand):
483482 >>> res = eddy.run() # doctest: +SKIP
484483
485484 """
486- _cmd = 'eddy '
485+ _cmd = 'eddy_openmp '
487486 input_spec = EddyInputSpec
488487 output_spec = EddyOutputSpec
489488
@@ -492,8 +491,8 @@ class Eddy(FSLCommand):
492491 def __init__ (self , ** inputs ):
493492 super (Eddy , self ).__init__ (** inputs )
494493 self .inputs .on_trait_change (self ._num_threads_update , 'num_threads' )
495- if isdefined (self .inputs .use_gpu ):
496- self ._use_gpu ()
494+ if isdefined (self .inputs .use_cuda ):
495+ self ._use_cuda ()
497496 if not isdefined (self .inputs .num_threads ):
498497 self .inputs .num_threads = self ._num_threads
499498 else :
@@ -508,13 +507,11 @@ def _num_threads_update(self):
508507 self .inputs .environ ['OMP_NUM_THREADS' ] = str (
509508 self .inputs .num_threads )
510509
511- def _use_gpu (self ):
512- if self .inputs .use_gpu . lower (). startswith ( 'cuda' ) :
510+ def _use_cuda (self ):
511+ if self .inputs .use_cuda :
513512 _cmd = 'eddy_cuda'
514- elif self .inputs .use_gpu .lower ().startswith ('openmp' ):
515- _cmd = 'eddy_openmp'
516513 else :
517- _cmd = 'eddy '
514+ _cmd = 'eddy_openmp '
518515
519516 def _format_arg (self , name , spec , value ):
520517 if name == 'in_topup_fieldcoef' :
0 commit comments