Repository navigation
Runtime frame trace on the CPU (recording device, no GPU) - #108
Merged
Merged
Conversation
…evice (no GPU, no HIP) clean/tests/runtime_frame_trace.cpp runs the runtime on a device that records code object loads and launches instead of executing them; test_runtime_frame_trace.py checks Model M's sequence. The base for checking Model L's frame against Model M's. Nothing changes in the runtime. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
… paths The recording device loads tagged code objects (load_module_tagged), so the pack12 decoder, the fused dec1 + dec0 and the wave64 post paths run on it; the test selects them by placeholder files of their code object names. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.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.
The runtime's frames on the CPU, without a GPU and without HIP: a test program runs the runtime
(
clean/runtime/runtime.cpp) on a recording device. The device keeps buffers in host memory and records code objectloads (with their tags) and launches (kernel, grid, block) instead of executing them. This is the base for the Model L runtime frame
(P13 in
community/MODEL-L-SCOPE.md): Model L's frame is Model M's frame with the encoder and decoder steps replaced,and this trace lets a CPU test check exactly that. Nothing changes in the runtime.
What is added (
clean/tests/)runtime_frame_trace.cpp: the recording device,runtime_createwith it on a raw model, N frames of zero inputs.It prints the create result, the code objects loaded, every frame's launches, and the runtime's kernel summary.
The device backends are not linked; two stubs stand in for the factory functions that
runtime.cppnames.test_runtime_frame_trace.pychecks:synthetic_model.write_raw): create, code objects loaded, four frames of launches. Thelaunches repeat every second frame because the window offsets alternate.
pack12 decoder, dec1 fused with dec0, and the wave64 post (tagged code objects);
model=Lis refused at create (for now).WG_*variables are removed for the runs.host_cxx.py: the host C++ build used by the test (CXX, clang++, g++, or MSVC cl through vcvars64.bat; the samesteps as
test_model_pack_cpp.py), now shared so the L frame tests can use it.Refs #89
Tested
python -m unittest clean.tests.test_runtime_frame_trace: 4 tests, OK (MSVC, Windows).Not tested
host_cxx.py(g++/clang++ with-ldl -pthread); CI runs on Windows.