Repository navigation
opencl: handle clCreateSubDevicesEXT in the interval plugin - #571
Merged
Merged
Conversation
thapi_log_to_bt_source_component.rb only handled an empty array field
("x_vals: [ ]"). For a non-empty one it passed the first value cast to
a pointer, and the field split cut a list at its commas. Emit a
compound literal of the element type instead, and split fields on
commas outside brackets.
No existing test uses a non-empty array.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The set create_sub_devices_entry matches clCreateSubDevicesEXT_entry too (unanchored name), but create_sub_devices_exit needs num_devices_ret_val, which clCreateSubDevicesEXT_exit calls num_devices_val. So the EXT entry pushed its device and nothing popped it: the next EXT entry aborted to_aggreg with "push was not empty" (#568), and EXT sub-devices were never mapped to their root device. Add a create_sub_devices_ext_exit set and have both exits share the mapping code. New test create_sub_devices_ext: a failing then a successful clCreateSubDevicesEXT, and a command on the sub-device. Without the fix it aborts with "push was not empty"; with it the command runs on did = 10 (root), sdid = 11 (sub-device). Fixes #568 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #568.
Bug
In tally mode, two
clCreateSubDevicesEXTcalls abortbabeltrace_thapi to_aggregwithpush was not empty, and no tally is produced.In
btx_clmatching_model.yaml,create_sub_devices_entrymatchesclCreateSubDevicesEXT_entrytoo (unanchored name), butcreate_sub_devices_exitneedsnum_devices_ret_val, whichclCreateSubDevicesEXT_exitcallsnum_devices_val. So the EXT entry pushed its device and nothing popped it. The next EXT entry threw inEntryState::set_data_impl, and EXT sub-devices were never mapped to their root device.Fix
create_sub_devices_ext_exitset (num_devices_val). Both exit callbacks share the mapping code.thapi_log_to_bt_source_component.rbnow handles non-empty array fields (devices_vals: [ 10 ]). It used to pass the first value cast to a pointer, and its field split cut a list at its commas. It now emits a compound literal of the element type. No existing test uses a non-empty array.create_sub_devices_ext:clGetDeviceIDsreturns device 10, a failing then a successfulclCreateSubDevicesEXTreturns sub-device 11, and a read on a queue of 11 runs.Checked
push was not empty. With it, the read runs ondid = 10, sdid = 11.make check: 10/10.clCreateSubDevicesEXTcalls in tally mode no longer abort.🤖 Generated with Claude Code