-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Description
Tested only in DaCe v1
The following code should work
import dace
import cupy as cp
import numpy as np
@dace.program
def multidimred(a, b):
b[:] = np.sum(a, axis=(0, 1))
a = cp.random.rand(2, 2, 6)
b = cp.random.rand(6)
multidimred(a, b)but it dies in codegen:
File "/home/fgdeconi/work/git/ndsl/external/dace/dace/codegen/dispatcher.py", line 466, in dispatch_scope
self._map_dispatchers[map_schedule].generate_scope(sdfg, cfg, sub_dfg, state_id, function_stream,
File "/home/fgdeconi/work/git/ndsl/external/dace/dace/codegen/targets/cuda.py", line 1656, in generate_scope
cudastream = '__state->gpu_context->streams[%d]' % scope_entry._cuda_stream
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MapEntry' object has no attribute '_cuda_stream'
There's a unit test testing this exact code. But the test doesn't call the program directly, instead it runs
sdfg = multidimred.to_sdfg(a, b)
sdfg.apply_gpu_transformations()which, indeed fixes the present issue, but arguably shouldn't be needed.
PS: The cupy.max is not supported.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels