-
Notifications
You must be signed in to change notification settings - Fork 252
Revert "Revert "Fix get_nested_resource_ptr to accept both str and bytes inputs"" #1698
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -99,6 +99,13 @@ def test_create_and_destroy(option): | |
| nvjitlink.destroy(handle) | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("option", ARCHITECTURES) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to parametrize it, just one |
||
| def test_create_and_destroy_bytes_options(option): | ||
| handle = nvjitlink.create(1, [f"-arch={option}".encode()]) | ||
| assert handle != 0 | ||
| nvjitlink.destroy(handle) | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("option", ARCHITECTURES) | ||
| def test_complete_empty(option): | ||
| handle = nvjitlink.create(1, [f"-arch={option}"]) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,7 +115,9 @@ def test_get_buffer_empty(get_size, get_buffer): | |
| assert buffer == b"\x00" | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("options", [[], ["-opt=0"], ["-opt=3", "-g"]]) | ||
| @pytest.mark.parametrize( | ||
| "options", [[], ["-opt=0"], ["-opt=3", "-g"], [b"-opt=0"], [b"-opt=3", b"-g"], ["-opt=3", b"-g"]] | ||
| ) | ||
|
Comment on lines
+118
to
+120
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
| def test_compile_program_with_minimal_nvvm_ir(minimal_nvvmir, options): # noqa: F401, F811 | ||
| with nvvm_program() as prog: | ||
| nvvm.add_module_to_program(prog, minimal_nvvmir, len(minimal_nvvmir), "FileNameHere.ll") | ||
|
|
@@ -135,7 +137,9 @@ def test_compile_program_with_minimal_nvvm_ir(minimal_nvvmir, options): # noqa: | |
| assert ".visible .entry kernel()" in buffer.decode() | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("options", [[], ["-opt=0"], ["-opt=3", "-g"]]) | ||
| @pytest.mark.parametrize( | ||
| "options", [[], ["-opt=0"], ["-opt=3", "-g"], [b"-opt=0"], [b"-opt=3", b"-g"], ["-opt=3", b"-g"]] | ||
| ) | ||
|
Comment on lines
+140
to
+142
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto; also, if this is already tested above, no need to test again |
||
| def test_verify_program_with_minimal_nvvm_ir(minimal_nvvmir, options): # noqa: F401, F811 | ||
| with nvvm_program() as prog: | ||
| nvvm.add_module_to_program(prog, minimal_nvvmir, len(minimal_nvvmir), "FileNameHere.ll") | ||
|
|
||
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.
In general we should let Cython figure out the correct C API to use, and not intervene with manual C API calls unless we can prove