Skip to content

Commit df5aa45

Browse files
committed
Fix build failure when MEM_DEBUG_MSG is enabled
../../src/acl_kernel.cpp:2856:59: error: ‘needed_physical_id’ was not declared in this scope printf("needed_physical_id %d needed_mem_id %d ", needed_physical_id, ^~~~~~~~~~~~~~~~~~ Signed-off-by: Peter Colberg <[email protected]>
1 parent 079d575 commit df5aa45

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/acl_kernel.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2848,7 +2848,9 @@ l_copy_and_adjust_arguments_for_device(cl_kernel kernel, cl_device_id device,
28482848
#ifdef MEM_DEBUG_MSG
28492849
printf("regular buffer ");
28502850
#endif
2851-
unsigned needed_mem_id = l_get_kernel_arg_mem_id(kernel, iarg);
2851+
const unsigned int needed_mem_id =
2852+
l_get_kernel_arg_mem_id(kernel, iarg);
2853+
const unsigned int needed_physical_id = device->def.physical_device_id;
28522854

28532855
// Always enqueue a migration, even if the memory is where it should be there
28542856
// could be something in the queue ahead of us which will move the memory.
@@ -2858,7 +2860,6 @@ l_copy_and_adjust_arguments_for_device(cl_kernel kernel, cl_device_id device,
28582860
#endif
28592861

28602862
// first, is there a reserved region?
2861-
unsigned needed_physical_id = device->def.physical_device_id;
28622863
if (mem_obj->reserved_allocations_count[needed_physical_id].size() ==
28632864
0) {
28642865
acl_resize_reserved_allocations_for_device(mem_obj, device->def);

0 commit comments

Comments
 (0)