-
Notifications
You must be signed in to change notification settings - Fork 810
[SYCL] Fix issue with sub-sub-device in plugin #6349
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we initialize all fields of ZeProperties (there are more of them, see https://spec.oneapi.io/level-zero/latest/core/api.html?highlight=numqueues#ze-command-queue-group-properties-t)?
Can we reuse zeDeviceGetCommandQueueGroupProperties result from here https://github.com/intel/llvm/pull/6349/files#diff-15dd1eb076d2164bd9e87d9057f05f652a716498e8cdf5975e564c65309a0985R684-R685? If I am not mistaken ZeProperties is supposed to be initialized using zeDeviceGetCommandQueueGroupProperties and not manually.
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.
L0 backend does not have any subsub devices. In the current implementation, we piggy back on the sub-device to act as the ZeDevice for subsubdevice. So, the zeDeviceGetCommandQueueGroupProperties returns the properties for sub-device and not the subsub device. So, that's why I am not using it here.
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.
Also, about initializing all other fields. I think we can try to initialize minimal number of fields. Currently, we need only the number of queues.
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.
Sorry, but I have troubles understanding why it is ok to initialize only numQueues.
For example, at this part of code in enqueueMemFillHelper we use maxMemoryFillPatternSize:
https://github.com/intel/llvm/blob/sycl/sycl/plugins/level_zero/pi_level_zero.cpp#L6399-L6419
If Device at this part of code is a sub-sub device then we use uninitialized field maxMemoryFillPatternSize there.
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.
As @asudarsa mentions, L0 doesn't have sub-sub-devices, to the properties you can get are the ones from the sub-device. I think that we have two options:
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.
I agree for sub-sub-device we need to initialize the entire
ZeProperties(of typeze_command_queue_group_properties_t), populate it with what it's parent sub-device has inzeDeviceGetCommandQueueGroupPropertiesand then update as makes sense, e.g. setnumQueues = 1There 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.
Hi @smaslov-intel and @jandres742
Thanks so much for the feedback. As you mentioned, I think it is a good idea to initialize the entire ZeProperties structure using data gathered for sub-device. However, zeDeviceGetCommandQueueGroupProperties returns multiple ZeProperties, one for each group. I think I will try to use the one for 'compute' group. Please let me know if there are questions.
Thanks again
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.
Added a new commit addressing changes. Thanks
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.
Looks good, but please add a comment why "numQueues" is updated for sub-sub-device