forked from mindspore-Ecosystem/mindspore
fix workspace address type
This commit is contained in:
parent
a34d737858
commit
5e0bc410b3
|
@ -125,7 +125,7 @@ bool GpuKernelMod::Launch(const std::vector<AddressPtr> &inputs, const std::vect
|
||||||
[](const AddressPtr &output) -> void * { return reinterpret_cast<void *>(&(output->addr)); });
|
[](const AddressPtr &output) -> void * { return reinterpret_cast<void *>(&(output->addr)); });
|
||||||
if (!workspace.empty()) {
|
if (!workspace.empty()) {
|
||||||
(void)std::transform(std::begin(workspace), std::end(workspace), std::back_inserter(runtimeargs),
|
(void)std::transform(std::begin(workspace), std::end(workspace), std::back_inserter(runtimeargs),
|
||||||
[](const AddressPtr &addr) -> void * { return addr->addr; });
|
[](const AddressPtr &addr) -> void * { return reinterpret_cast<void *>(&(addr->addr)); });
|
||||||
}
|
}
|
||||||
result = cuLaunchKernel(kernel_addr, thread_info[0], thread_info[1], thread_info[2], thread_info[3], thread_info[4],
|
result = cuLaunchKernel(kernel_addr, thread_info[0], thread_info[1], thread_info[2], thread_info[3], thread_info[4],
|
||||||
thread_info[5], 0, reinterpret_cast<CUstream>(stream_ptr),
|
thread_info[5], 0, reinterpret_cast<CUstream>(stream_ptr),
|
||||||
|
|
Loading…
Reference in New Issue