Skip to content

Commit 98f7a55

Browse files
authored
[Fix] Fix DCU port compilation error (deepmodeling#6017)
* Fix dcu compilation error * Fix another part
1 parent 0480f52 commit 98f7a55

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

source/module_base/module_device/rocm/memory_op.hip.cu

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ struct cast_memory_op<FPTYPE_out, FPTYPE_in, base_device::DEVICE_GPU, base_devic
108108
// No need to cast the memory if the data types are the same.
109109
if (std::is_same<FPTYPE_out, FPTYPE_in>::value)
110110
{
111-
synchronize_memory_op<FPTYPE_out, base_device::DEVICE_GPU, base_device::DEVICE_CPU>()(dev_out,
112-
dev_in,
113-
arr_out,
111+
synchronize_memory_op<FPTYPE_out, base_device::DEVICE_GPU, base_device::DEVICE_CPU>()(arr_out,
114112
reinterpret_cast<const FPTYPE_out*>(arr_in),
115113
size);
116114
return;
@@ -135,9 +133,7 @@ struct cast_memory_op<FPTYPE_out, FPTYPE_in, base_device::DEVICE_CPU, base_devic
135133
// No need to cast the memory if the data types are the same.
136134
if (std::is_same<FPTYPE_out, FPTYPE_in>::value)
137135
{
138-
synchronize_memory_op<FPTYPE_out, base_device::DEVICE_CPU, base_device::DEVICE_GPU>()(dev_out,
139-
dev_in,
140-
arr_out,
136+
synchronize_memory_op<FPTYPE_out, base_device::DEVICE_CPU, base_device::DEVICE_GPU>()(arr_out,
141137
reinterpret_cast<const FPTYPE_out*>(arr_in),
142138
size);
143139
return;

0 commit comments

Comments
 (0)