Skip to content

Commit 43c4acd

Browse files
committed
wip
1 parent ceffdb3 commit 43c4acd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

fbgemm_gpu/src/memory_utils/memory_utils.cu

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,20 +146,24 @@ std::tuple<void*, size_t> adjust_to_page_boundaries(void* ptr, size_t size) {
146146

147147
#ifdef USE_ROCM
148148
using gpuMemLocation = hipMemLocation;
149+
using gpuMemLocationTypeHost = hipMemLocationTypeHost;
150+
using gpuMemLocationTypeDevice = hipMemLocationTypeDevice;
149151
#else
150152
using gpuMemLocation = cudaMemLocation;
153+
using gpuMemLocationTypeHost = cudaMemLocationTypeHost;
154+
using gpuMemLocationTypeDevice = cudaMemLocationTypeDevice;
151155
#endif
152156

153157
inline gpuMemLocation new_mem_location_from_device(const int device_id) {
154158
gpuMemLocation deviceLoc;
155-
deviceLoc.type = cudaMemLocationTypeDevice;
159+
deviceLoc.type = gpuMemLocationTypeDevice;
156160
deviceLoc.id = device_id;
157161
return deviceLoc;
158162
}
159163

160164
inline gpuMemLocation new_mem_location_cpu() {
161165
gpuMemLocation deviceLoc;
162-
deviceLoc.type = cudaMemLocationTypeHost;
166+
deviceLoc.type = gpuMemLocationTypeHost;
163167
deviceLoc.id = cudaCpuDeviceId;
164168
return deviceLoc;
165169
}

0 commit comments

Comments
 (0)