Skip to content

fix(rocjitsu): Populate KFD CPU node name - #10569

Open
RattataKing wants to merge 1 commit into
developfrom
users/RattataKing/rocjitsu-cpu-node-name
Open

fix(rocjitsu): Populate KFD CPU node name#10569
RattataKing wants to merge 1 commit into
developfrom
users/RattataKing/rocjitsu-cpu-node-name

Conversation

@RattataKing

Copy link
Copy Markdown
Contributor

rocprofiler-sdk unconditionally checks every KFD topology node’s name file. Add the missing name file to rocjitsu's simulated CPU node to resolve this compatibility issue.

Close issue: #10566

@therock-pr-bot

therock-pr-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: emulation/rocjitsu/lib/rocjitsu/src/rocjitsu/kmd/linux/sysfs.cpp; no test file found
🔎 pre-commit ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled
🤖 therock-pr-bot ✅ Pass

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@kuhar kuhar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one note to consider


write_file(node_dir + "/gpu_id", "0\n");
// KFD publishes a name file for every topology node.
write_file(node_dir + "/name", "");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should write "\n" here and pin that exact value in sysfs_test.cpp. Both the live KFD CPU node on this machine and the in-tree captured topology contain the single byte 0a, and the GPU path already appends the same newline. write_file(..., "") instead creates a zero-byte file, so line-based readers such as std::getline see EOF rather than a readable empty name. A focused Sysfs::generate() check for nodes/0/name == "\n" would cover both the presence of the attribute and its KFD-compatible contents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants