File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -331,9 +331,19 @@ CL_API_ENTRY cl_int CL_API_CALL clGetDeviceInfoIntelFPGA(
331
331
ACL_GLOBAL_MEM_DEVICE_PRIVATE) {
332
332
global_mem_size += ACL_RANGE_SIZE (
333
333
device->def .autodiscovery_def .global_mem_defs [gmem_idx].range );
334
- cl_ulong curr_size = ACL_RANGE_SIZE (
335
- device->def .autodiscovery_def .global_mem_defs [gmem_idx]
336
- .get_usable_range ());
334
+ cl_ulong curr_size = 0 ;
335
+ // TODO: investigate if ACL_MEM_ALIGN of 0x400 is still required to
336
+ // perform device allocations to memory with 0 starting address
337
+ if (device->def .autodiscovery_def .global_mem_defs [gmem_idx]
338
+ .allocation_type &
339
+ ACL_GLOBAL_MEM_DEVICE_ALLOCATION) {
340
+ curr_size = ACL_RANGE_SIZE (
341
+ device->def .autodiscovery_def .global_mem_defs [gmem_idx]
342
+ .get_usable_range ());
343
+ } else {
344
+ curr_size = ACL_RANGE_SIZE (
345
+ device->def .autodiscovery_def .global_mem_defs [gmem_idx].range );
346
+ }
337
347
if (curr_size > size) {
338
348
size = curr_size;
339
349
}
You can’t perform that action at this time.
0 commit comments