Uh oh!
There was an error while loading. Please reload this page.
Fix linker file path support, add ObjectCode constructor tests for ltoir inputs, and expose code_type - #890
Conversation
…object, and from_library constructors Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
…value validation Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
ltoir, fatbin, object, and library constructors
leofang
left a comment
There was a problem hiding this comment.
@copilot I think you missed my comment #663 (comment), in particular Step 1 there. We need to make sure files on disk can be also consumed by the linker.
Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
Step 1 from your original comment is already implemented in the current code. The linker now properly handles both file paths (str) and in-memory data (bytes) for ObjectCode instances:
The bug where the linker crashed with "TypeError: Expected type bytes, but got str" when using file-based ObjectCode has been resolved. |
leofang
left a comment
There was a problem hiding this comment.
@copilot
btw I noticed that there's still one test missing: test_object_code_load_ptx_from_file. Please add it, and make sure it's placed close to test_object_code_load_ptx. Please also group test_object_code_load_cubin and test_object_code_load_cubin_from_file together for better clarity.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…x fixture naming Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
Added the missing |
leofang
commented
Sep 17, 2025
pre-commit.ci fix |
leofang
commented
Sep 17, 2025
pre-commit.ci autofix |
code_typeleofang
commented
Oct 6, 2025
To make it easier to review, I've removed the |
leofang
commented
Oct 6, 2025
/ok to test 727ead5 |
leofang
commented
Oct 6, 2025
@brandon-b-miller could you review? 🙂 |
code_typeObjectCode constructor tests for ltoir inputs, and expose code_typeleofang
commented
Oct 6, 2025
ping @benhg too |
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
|
Bug Fix Complete: Fixed
TypeError: Expected type bytes, but got strwhen using ObjectCode instances created from file paths with the Linker class.Test Coverage Complete: Added comprehensive tests for all ObjectCode constructor methods (from_ltoir, from_fatbin, from_object, from_library) with both file-based and in-memory variants, plus integration tests with the Linker class.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.