-
Notifications
You must be signed in to change notification settings - Fork 795
Open
Labels
Description
Cuda support allocation in global memory and cache, the ask is to let cuda usm allocation reserve cache memory when buffer location property of value of 4 is passed in.
change will need to be made here:
llvm/sycl/plugins/cuda/pi_cuda.cpp
Lines 4573 to 4593 in d47dda3
pi_result cuda_piextUSMDeviceAlloc(void **result_ptr, pi_context context, | |
pi_device device, | |
pi_usm_mem_properties *properties, | |
size_t size, pi_uint32 alignment) { | |
assert(result_ptr != nullptr); | |
assert(context != nullptr); | |
assert(device != nullptr); | |
assert(properties == nullptr); | |
pi_result result = PI_SUCCESS; | |
try { | |
ScopedContext active(context); | |
result = PI_CHECK_ERROR(cuMemAlloc((CUdeviceptr *)result_ptr, size)); | |
} catch (pi_result error) { | |
result = error; | |
} | |
assert(alignment == 0 || | |
(result == PI_SUCCESS && | |
reinterpret_cast<std::uintptr_t>(*result_ptr) % alignment == 0)); | |
return result; | |
} |
enum class target {
device,
host_task,
global_buffer = device, // Deprecated
constant_buffer, // Deprecated
local, // Deprecated
host_buffer // Deprecated
};
zjin-lcf