File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -85,10 +85,21 @@ def _kernel_args_(self):
8585
8686class Arg (Arg ):
8787 """
88- Arg for GPU
88+ Arg for GPU.
8989 """
9090
9191
92+ class ExtrudedSet (ExtrudedSet ):
93+ """
94+ ExtrudedSet for GPU.
95+ """
96+ @cached_property
97+ def _kernel_args_ (self ):
98+ m_gpu = cuda .mem_alloc (int (self .layers_array .nbytes ))
99+ cuda .memcpy_htod (m_gpu , self .layers_array )
100+ return (m_gpu ,)
101+
102+
92103class Dat (petsc_Dat ):
93104 """
94105 Dat for GPU.
@@ -373,11 +384,9 @@ def argtypes(self):
373384 @cached_property
374385 def argshapes (self ):
375386 argshapes = ((), ())
376- # argtypes += self._iterset._argtypes_
377387 if self ._iterset ._argtypes_ :
378- raise NotImplementedError ("Do not know what to do when"
379- " self._iterset._argtypes is not empty, is this the case"
380- " when we have extruded mesh" )
388+ # TODO: verify that this bogus value doesn't affect anyone.
389+ argshapes += ((), )
381390
382391 for arg in self ._args :
383392 argshapes += (arg .data .shape , )
Original file line number Diff line number Diff line change 33
44def snpt_transform (kernel , block_size ):
55 """
6- SNPT := Single 'n' Per Thread transformation.
6+ SNPT := Single 'n' Per Thread.
7+
8+ Implements outer-loop parallelization strategy.
79
810 PyOP2 uses 'n' as the outer loop iname. In Firedrake 'n' might denote
911 either a cell or a DOF.
You can’t perform that action at this time.
0 commit comments