-
Notifications
You must be signed in to change notification settings - Fork 792
[UR][L0 v2] Set pointer kernel arguments only for queue's associated device #20179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f961f83
to
3148745
Compare
3148745
to
51f881d
Compare
51f881d
to
fc827a1
Compare
// In multi-device context store the raw pointer value and defer setting the | ||
// argument until we know the device where kernel is being submitted. | ||
if (hKernel->getContext()->getDevices().size() > 1) { | ||
hKernel->addPendingPointerArgument(argIndex, pArgValue); | ||
return UR_RESULT_SUCCESS; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh I'd rather we have the same path for both scenarios. But this is going to be rewritten/removed with the transition to enqueue kernel with args, so up to you if you want to change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
return UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX; | ||
} | ||
|
||
pending_pointer_args.push_back({argIndex, pArgValue}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a potential allocation in the hot path. Might be worth testing performance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, here is the successful perf testing for this PR: https://github.com/intel/llvm/actions/runs/18106004233
…ice (#20177) In multi-device context, ensure that pointer kernel arguments are set only for the device associated with the queue being used for kernel launch. Previously, arguments were set for all devices in the kernel's device map, which was unnecessary and potentially incorrect when launching on a specific device. Same will be done for v2 adapter here: #20179
In multi-device context, ensure that pointer kernel arguments are set only for the device associated with the queue being used for kernel launch. Previously, arguments were set for all devices in the kernel's device map, which was unnecessary and potentially incorrect when launching on a specific device. Same will be done for v2 adapter here: intel/llvm#20179
uint32_t groupSizeY, uint32_t groupSizeZ, | ||
ze_command_list_handle_t commandList, wait_list_view &waitListView) { | ||
auto hZeKernel = getZeHandle(hDevice); | ||
auto &deviceKernelOpt = deviceKernels[deviceIndex(hDevice)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I'm wondering whether getZeHandle
should also perform this .has_value()
check.
No description provided.