From 2aca1ce3c56aa90b6f7c93d43085e25f50670838 Mon Sep 17 00:00:00 2001 From: brandon-b-miller <53796099+brandon-b-miller@users.noreply.github.com> Date: Thu, 20 Jul 2023 12:43:46 -0500 Subject: [PATCH 01/27] skip tests that can corrupt memory (#3) --- nvjitlink/tests/test_nvjitlink.py | 8 ++++---- nvjitlink/tests/test_nvjitlink_api.py | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/nvjitlink/tests/test_nvjitlink.py b/nvjitlink/tests/test_nvjitlink.py index 39910b4a..72d43192 100644 --- a/nvjitlink/tests/test_nvjitlink.py +++ b/nvjitlink/tests/test_nvjitlink.py @@ -48,7 +48,7 @@ def device_functions_ptx(): def undefined_extern_cubin(): return read_test_file('undefined_extern.cubin') - +@pytest.mark.skip def test_create_no_arch_error(): # nvjitlink expects at least the architecture to be specified. with pytest.raises(RuntimeError, @@ -63,13 +63,13 @@ def test_invalid_arch_error(): match='NVJITLINK_ERROR_UNRECOGNIZED_OPTION error'): _nvjitlinklib.create('-arch=sm_XX') - +@pytest.mark.skip def test_unrecognized_option_error(): with pytest.raises(RuntimeError, match='NVJITLINK_ERROR_UNRECOGNIZED_OPTION error'): _nvjitlinklib.create('-fictitious_option') - +@pytest.mark.skip def test_invalid_option_type_error(): with pytest.raises(TypeError, match='Expecting only strings'): @@ -108,7 +108,7 @@ def test_add_file(input_file, input_type, request): _nvjitlinklib.add_data(handle, input_type.value, data, filename) _nvjitlinklib.destroy(handle) - +@pytest.mark.skip def test_get_error_log(undefined_extern_cubin): handle = _nvjitlinklib.create('-arch=sm_75') filename, data = undefined_extern_cubin diff --git a/nvjitlink/tests/test_nvjitlink_api.py b/nvjitlink/tests/test_nvjitlink_api.py index d012403a..85aae91b 100644 --- a/nvjitlink/tests/test_nvjitlink_api.py +++ b/nvjitlink/tests/test_nvjitlink_api.py @@ -30,21 +30,21 @@ def undefined_extern_cubin(): with open(fatbin_path, 'rb') as f: return f.read() - +@pytest.mark.skip def test_create_no_arch_error(): # nvlink expects at least the architecture to be specified. with pytest.raises(NvJitLinkError, match='NVJITLINK_ERROR_MISSING_ARCH error'): NvJitLinker() - +@pytest.mark.skip def test_invalid_arch_error(): # sm_XX is not a valid architecture with pytest.raises(NvJitLinkError, match='NVJITLINK_ERROR_UNRECOGNIZED_OPTION error'): NvJitLinker('-arch=sm_XX') - +@pytest.mark.skip def test_invalid_option_type_error(): with pytest.raises(TypeError, match='Expecting only strings'): @@ -61,7 +61,7 @@ def test_add_cubin(device_functions_cubin): name = 'test_device_functions.cubin' nvjitlinker.add_cubin(device_functions_cubin, name) - +@pytest.mark.skip def test_add_incompatible_cubin_arch_error(device_functions_cubin): nvjitlinker = NvJitLinker('-arch=sm_70') name = 'test_device_functions.cubin' @@ -81,7 +81,7 @@ def test_add_fatbin_sm70(device_functions_fatbin): name = 'test_device_functions.fatbin' nvjitlinker.add_fatbin(device_functions_fatbin, name) - +@pytest.mark.skip def test_add_incompatible_fatbin_arch_error(device_functions_fatbin): nvjitlinker = NvJitLinker('-arch=sm_80') name = 'test_device_functions.fatbin' @@ -89,7 +89,7 @@ def test_add_incompatible_fatbin_arch_error(device_functions_fatbin): match='NVJITLINK_ERROR_INVALID_INPUT error'): nvjitlinker.add_fatbin(device_functions_fatbin, name) - +@pytest.mark.skip def test_add_cubin_with_fatbin_error(device_functions_fatbin): nvjitlinker = NvJitLinker('-arch=sm_75') name = 'test_device_functions.fatbin' @@ -105,7 +105,7 @@ def test_add_fatbin_with_cubin(device_functions_cubin): name = 'test_device_functions.cubin' nvjitlinker.add_fatbin(device_functions_cubin, name) - +@pytest.mark.skip def test_duplicate_symbols_cubin_and_fatbin(device_functions_cubin, device_functions_fatbin): # This link errors because the cubin and the fatbin contain the same @@ -136,7 +136,7 @@ def test_get_linked_cubin(device_functions_cubin): # Just check we got something that looks like an ELF assert cubin[:4] == b'\x7fELF' - +@pytest.mark.skip def test_get_error_log(undefined_extern_cubin): nvjitlinker = NvJitLinker('-arch=sm_75') name = 'undefined_extern.cubin' From e489f502eefaf006d7b6dddf546e6a68154d950f Mon Sep 17 00:00:00 2001 From: brandon-b-miller <53796099+brandon-b-miller@users.noreply.github.com> Date: Tue, 25 Jul 2023 15:14:50 -0500 Subject: [PATCH 02/27] nvjitlink->pynvjitlink (#5) * nvjitlink->pynvjitlink * update codeowners file * lint codeowners --- .github/CODEOWNERS | 13 ++++--------- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- .github/ISSUE_TEMPLATE/feature-request.md | 4 ++-- .github/ISSUE_TEMPLATE/submit-question.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- CHANGELOG.md | 2 +- CMakeLists.txt | 6 +++--- README.md | 10 +++++----- {nvjitlink => pynvjitlink}/__init__.py | 2 +- {nvjitlink => pynvjitlink}/_nvjitlinklib.cpp | 2 +- {nvjitlink => pynvjitlink}/api.py | 2 +- {nvjitlink => pynvjitlink}/patch.py | 2 +- .../tests/test_device_functions.a | Bin .../tests/test_device_functions.cubin | Bin .../tests/test_device_functions.fatbin | Bin .../tests/test_device_functions.ltoir | Bin .../tests/test_device_functions.o | Bin .../tests/test_device_functions.ptx | 0 .../tests/test_pynvjitlink.py | 4 ++-- .../tests/test_pynvjitlink_api.py | 2 +- .../tests/undefined_extern.cubin | Bin pyproject.toml | 2 +- test_binary_generation/Makefile | 4 ++-- 23 files changed, 29 insertions(+), 34 deletions(-) rename {nvjitlink => pynvjitlink}/__init__.py (65%) rename {nvjitlink => pynvjitlink}/_nvjitlinklib.cpp (99%) rename {nvjitlink => pynvjitlink}/api.py (98%) rename {nvjitlink => pynvjitlink}/patch.py (98%) rename {nvjitlink => pynvjitlink}/tests/test_device_functions.a (100%) rename {nvjitlink => pynvjitlink}/tests/test_device_functions.cubin (100%) rename {nvjitlink => pynvjitlink}/tests/test_device_functions.fatbin (100%) rename {nvjitlink => pynvjitlink}/tests/test_device_functions.ltoir (100%) rename {nvjitlink => pynvjitlink}/tests/test_device_functions.o (100%) rename {nvjitlink => pynvjitlink}/tests/test_device_functions.ptx (100%) rename nvjitlink/tests/test_nvjitlink.py => pynvjitlink/tests/test_pynvjitlink.py (98%) rename nvjitlink/tests/test_nvjitlink_api.py => pynvjitlink/tests/test_pynvjitlink_api.py (99%) rename {nvjitlink => pynvjitlink}/tests/undefined_extern.cubin (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c0463368..b7ac431a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,14 +1,9 @@ #python code owners -nvjitlink/ @rapidsai/nvjitlink-python-codeowners +pynvjitlink/ @rapidsai/pynvjitlink-write #cmake code owners -**/CMakeLists.txt @rapidsai/nvjitlink-cmake-codeowners -**/cmake/ @rapidsai/nvjitlink-cmake-codeowners +**/CMakeLists.txt @rapidsai/pynvjitlink-write +**/cmake/ @rapidsai/pynvjitlink-write #build/ops code owners -.github/ @rapidsai/ops-codeowners -ci/ @rapidsai/ops-codeowners -conda/ @rapidsai/ops-codeowners -**/Dockerfile @rapidsai/ops-codeowners -**/.dockerignore @rapidsai/ops-codeowners -docker/ @rapidsai/ops-codeowners +.github/ @rapidsai/ops-codeowners diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 85bcc1e0..34df795e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Create a bug report to help us improve nvjitlink +about: Create a bug report to help us improve pynvjitlink title: "[BUG]" labels: "? - Needs Triage, bug" assignees: '' @@ -18,7 +18,7 @@ A clear and concise description of what you expected to happen. **Environment details (please complete the following information):** - Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)] - - Method of nvjitlink install: [conda, Docker, or from source] + - Method of pynvjitlink install: [conda, Docker, or from source] - If method of install is [Docker], provide `docker pull` & `docker run` commands used diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 3457b336..d8efc8f9 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -1,6 +1,6 @@ --- name: Feature request -about: Suggest an idea for nvjitlink +about: Suggest an idea for pynvjitlink title: "[FEA]" labels: "? - Needs Triage, feature request" assignees: '' @@ -8,7 +8,7 @@ assignees: '' --- **Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I wish I could use nvjitlink to do [...] +A clear and concise description of what the problem is. Ex. I wish I could use pynvjitlink to do [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. diff --git a/.github/ISSUE_TEMPLATE/submit-question.md b/.github/ISSUE_TEMPLATE/submit-question.md index c1890912..b3b86d1d 100644 --- a/.github/ISSUE_TEMPLATE/submit-question.md +++ b/.github/ISSUE_TEMPLATE/submit-question.md @@ -1,6 +1,6 @@ --- name: Submit question -about: Ask a general question about nvjitlink +about: Ask a general question about pynvjitlink title: "[QST]" labels: "? - Needs Triage, question" assignees: '' diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4e930c42..03d36a01 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@