-
Notifications
You must be signed in to change notification settings - Fork 50
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
support HMM profiling event #96
Open
PhilipYangA
wants to merge
7
commits into
ROCm:master
Choose a base branch
from
PhilipYangA:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Install LICENSE.txt to share/doc/smi-lib Change-Id: Idcbb70db8808111203e8e4a4c3ab4d1e070ac79d
Add rpm License header for cpack Change-Id: I2f4a89015b6389cfde801f41d4f6e0f59e7087aa
pop_back() was causing a seg fault when pp_dpm_pcie file is empty and returns whitespace. Signed-off-by: Divya Shikre <[email protected]> Change-Id: I888f1f79751cd456e43751a5b96d08560a039677 (cherry picked from commit ec71380)
SMI lib function rsmi_event_notification_get read events from all GPUs, each event returned with device dv_idx. Currently we create read thread for each GPU, it is not necessary because each thread reads same events, and each thread display events from other GPUs with incorrect GPU index. Create one read thread for multiple GPUs, and display event with correct GPU index received from data.dv_idx. Signed-off-by: Philip Yang <[email protected]>
Update kfd_ioctl.h from KFD to add HMM migration and recoverable page fault, queue eviction and restore event, and event triggers defines. Update rocm_smi.h to add new SMI notification events and triggers defines, with the same enum value as kfd_ioctl.h, to avoid value translation in smi lib. Change fscanf %63s format to %MAX_EVENT_NOTIFICATION_MSG_SIZE[^\n] to read entire line as one message. Signed-off-by: Philip Yang <[email protected]>
Use SMI_EVENT_ALL_PROCESS to receive event from all processes because HMM migration events are per process event, KFD requires this flag plus super user premission to receive events from other process, so showevents to relaunchAsSudo if arguments are in new event list. User can specify event name in short format, for example "--showevents migrate" will show MIGRATE_START, MIGRATE_END events. Define message size using macro from rocm_smi.h Signed-off-by: Philip Yang <[email protected]>
Add new event names defines, set event mask RSMI_EVT_NOTIF_ALL_PROCESS to receive events from all processes. Add protection check in case new event type returns from KFD, to avoid out of range access segmentation fault. Signed-off-by: Philip Yang <[email protected]>
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.
Thanks. I have a few comments of this change.
bill-shuzhou-liu
force-pushed
the
master
branch
from
March 30, 2022 16:18
66e101a
to
bd95425
Compare
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.
Changes:
rocm smi lib: Define HMM profiling events
rocm_smi.py: showevents support HMM profiling events
unit test: TestEvtNotifReadWrite support HMM profiling events