Skip to content

Commit ccf73a6

Browse files
committed
Check that buffer is allocated on FPGA
1 parent 7af9aec commit ccf73a6

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

sycl/source/detail/memory_manager.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,11 @@ MemoryManager::allocateBufferObject(ContextImplPtr TargetContext, void *UserPtr,
363363
RT::PiMem NewMem = nullptr;
364364
const detail::plugin &Plugin = TargetContext->getPlugin();
365365

366-
// Check that devices within context has support of buffer location
367-
size_t return_size = 0;
368-
pi_device_info device_info;
366+
// buffer_location property has a meaning only on FPGA devices
369367
bool IsBufferLocSupported = true;
370368
auto Devices = TargetContext->getDevices();
371369
for (auto &Device : Devices) {
372-
const RT::PiDevice PiDevice = getSyclObjImpl(Device)->getHandleRef();
373-
if (Plugin.call_nocheck<detail::PiApiKind::piDeviceGetInfo>(
374-
PiDevice, PI_MEM_PROPERTIES_ALLOC_BUFFER_LOCATION,
375-
sizeof(pi_device_info), &device_info, &return_size) != PI_SUCCESS) {
370+
if (!Device.is_accelerator()) {
376371
IsBufferLocSupported = false;
377372
break;
378373
}

0 commit comments

Comments
 (0)