-
Notifications
You must be signed in to change notification settings - Fork 234
Fix linker file path support, add ObjectCode constructor tests for ltoir inputs, and expose code_type
#890
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
Conversation
…object, and from_library constructors Co-authored-by: leofang <[email protected]>
…value validation Co-authored-by: leofang <[email protected]>
ltoir, fatbin, object, and library constructors
leofang
left a comment
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.
@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 <[email protected]>
leofang
left a comment
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.
Co-authored-by: leofang <[email protected]>
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
…x fixture naming Co-authored-by: leofang <[email protected]>
Added the missing |
|
pre-commit.ci fix |
|
pre-commit.ci autofix |
code_type
|
To make it easier to review, I've removed the |
|
/ok to test 727ead5 |
|
@brandon-b-miller could you review? 🙂 |
code_typeObjectCode constructor tests for ltoir inputs, and expose code_type
|
ping @benhg too |
This comment has been minimized.
This comment has been minimized.
|
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.