Repository navigation
Conversation
Give the fake amd-smi the behaviors the remaining RDC fixes need to reproduce their bugs in CI: - Handles are generation-encoded numbers. The amdsmi_shut_down() that drops the last init reference ends the generation, so a handle kept across that shutdown is unknown, as to amd-smi: AMDSMI_STATUS_NOT_FOUND for a processor, AMDSMI_STATUS_INVAL for a socket. - RDC_FAKE_FAIL_ONCE, RDC_FAKE_UNFILLED and RDC_FAKE_DELAY_MS fail a call once, return success without writing outputs, or slow a call down; amdsmi_init honors the ones that apply to it. - RDC_FAKE_PROCS, RDC_FAKE_PROCS_GROW and RDC_FAKE_COUNTER_RESET model compute processes, processes that start between two calls, and counters that restart after a GPU reset. Process lists follow amd-smi's rules for short lists and count-only queries. - RDC_FAKE_CPER_COUNT, RDC_FAKE_EVENTS, RDC_FAKE_NUM_FREQ and RDC_FAKE_VERSION_BUILD_NULL can also break amd-smi's output contract on purpose (counts past what was written, an empty frequency table, a NULL build string), so tests can check that RDC does not trust its library blindly. A malformed value of these knobs aborts instead of silently disabling the fault. tests/ci/test_fake_gpu_fake.py checks each new knob and the handle rules against the fake directly. Signed-off-by: Adam360x <Adam.pryor@amd.com>
This was referenced Oct 22, 2026
adam360x
merged commit Oct 23, 2026
6adc211
into
users/adam360x/rdc-fake-gpu-tests
101 of 105 checks passed
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.
Motivation
The remaining RDC fixes in this series need the fake amd-smi to reproduce their bugs in CI.
Technical Details
amdsmi_shut_down()that drops the last init reference is unknown, as with amd-smi:AMDSMI_STATUS_NOT_FOUNDfor a processor,AMDSMI_STATUS_INVALfor a socket.RDC_FAKE_FAIL_ONCE,RDC_FAKE_UNFILLEDandRDC_FAKE_DELAY_MSfail a call once, return success without writing outputs, or slow a call down.RDC_FAKE_PROCS,RDC_FAKE_PROCS_GROWandRDC_FAKE_COUNTER_RESETmodel compute processes, processes that start between two calls, and counters that restart after a GPU reset.RDC_FAKE_CPER_COUNT,RDC_FAKE_EVENTS,RDC_FAKE_NUM_FREQandRDC_FAKE_VERSION_BUILD_NULLbreak amd-smi's output contract on purpose, so tests can check that RDC does not trust its library blindly.Test-only; no CHANGELOG entry.
Issue Tracking
ISSUE ID : #14107
Part of a series of RDC fixes, which #14107 lists. No JIRA ticket.
Test Plan
tests/ci/test_fake_gpu_fake.pychecks each new knob and the handle rules against the fake directly. Ran the fake-GPU suite andtests/ciin a GPU-less container, as CI does.Test Result
Fake-GPU suite: 130 passed, 24 skipped.
tests/ci: 92 passed, 6 skipped.Submission Checklist