{"id":30407726,"url":"https://github.com/jblaschke/pynvtx","last_synced_at":"2025-08-21T20:46:30.449Z","repository":{"id":62582162,"uuid":"317651146","full_name":"JBlaschke/PyNVTX","owner":"JBlaschke","description":"Thin pybind11 wrapper for NVTX wrappers -- with some bells and whistles attached.","archived":false,"fork":false,"pushed_at":"2021-05-06T17:13:19.000Z","size":58,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-16T01:50:25.906Z","etag":null,"topics":["cuda","nvtx","nvtx-markers"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JBlaschke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-01T19:49:46.000Z","updated_at":"2021-11-04T12:27:00.000Z","dependencies_parsed_at":"2022-11-03T21:36:49.521Z","dependency_job_id":null,"html_url":"https://github.com/JBlaschke/PyNVTX","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/JBlaschke/PyNVTX","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBlaschke%2FPyNVTX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBlaschke%2FPyNVTX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBlaschke%2FPyNVTX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBlaschke%2FPyNVTX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JBlaschke","download_url":"https://codeload.github.com/JBlaschke/PyNVTX/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBlaschke%2FPyNVTX/sbom","scorecard":{"id":68639,"data":{"date":"2025-08-11","repo":{"name":"github.com/JBlaschke/PyNVTX","commit":"7599a2df099a73d0fa8feff3e66967ff18b4ec0e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-15T03:16:32.565Z","repository_id":62582162,"created_at":"2025-08-15T03:16:32.566Z","updated_at":"2025-08-15T03:16:32.566Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271538991,"owners_count":24777482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cuda","nvtx","nvtx-markers"],"created_at":"2025-08-21T20:46:22.912Z","updated_at":"2025-08-21T20:46:30.407Z","avatar_url":"https://github.com/JBlaschke.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyNVTX\n\nA thin python wrapper for the nvToolsExt (NVTX) library, using pybind11. This\nwrapper is meant to be as thin as possible -- so only provides minimal support.\nCurrently supported features are:\n1. NVTX annotations: `nvtxRangePushA` and `nvtxRangePop`\n2. Function decorator: `PyNVTX.annotate`\n3. Automatic decorator generation `PyNVTX.annotate_all_methods(\u003cclass name\u003e)`\n\n\n\n## Installation\n\nEnsure that the `nvcc` is in your `PATH` -- or alternatively ensure that the\n`CUDAHOME` environment variable points to your local CUDA install. To install,\neither\n```\npip install PyNVTX\n```\nor clone this repo and\n```\npython setup.py install\n```\n\n\n### This Won't Break If You Don't Have CUDA\n\nYou know what would suck? If including `PyNVTX` required CUDA to be installed?\nWhy? There are loads of applications that support CUDA, if available. And\ndefault to the CPU-only version otherwise. `PyNVTX` is the same. If `nvcc` in\nnot in your `PATH` (nor in your `CUDAHOME`), then you'll see this warning:\n```\n *** WARNING: The nvcc binary could not be located in your $PATH. Either add it to your path, or set $CUDAHOME\n```\n(note that it will not warn you if you're installing with pip) and `PyNVTX`\nwill still install (it just won't do anything). You can check if a local\nversion of `PyNVTX` has been built with CUDA support by checking:\n```python\nPyNVTX.cuda_enabled # True if compiled with CUDA support\n```\n\n\n\n## NVTX Markers (`nvtxRangePushA` / `nvtxRangePop`)\n\n```python\nimport PyNVTX as nvtx\n\nnvtx.RangePushA(\"Doing some work\")\n\n# code to time goes here\n\nnvtx.RangePop()\n```\n\n\n### Function Decorator\n\nThe `PyNVTX.annotate` will put `RangePushA` and `RangePop` the the beginning and of\nthe function call:\n```python\nimport PyNVTX as nvtx\n\n@nvtx.annotate(\"test_function\")\ndef test():\n    # You code goes here\n```\n\n\n### Automatic Instrumentation\n\nThe `PyNVTX.annotate_all_methods` will automatically decorate all methods in a\nclass, as well as all methods it inherits. A guard prevents accidentally\ndecorating any method twice. Eg.:\n```python\nimport PyNVTX as nvtx\n\nclass MyClassA(object):\n    def __init__(self):\n        pass\n\n    def f(self):\n        pass\n\nclass MyClassB(MyClassA):\n    def __init__(self):\n        pass\n\n    def g(self):\n        pass\n\n\nnvtx.annotate_all_methods(MyClassB)\n```\nWill instrument `MyClassB`'s `__init__`, as well as `f` and `g`, but _not_\n`MyClassA`'s `__init__`.\n\nAdding a class/method name to `PyNVTX.REGISTRY` will prevent it from being\ninstrumented by `PyNVTX.annotate_all_methods`. For example:\n```python\nnvtx.REGISTRY.add(MyClassB, \"f\") # note the method name is a string\nnvtx.annotate_all_methods(MyClassB)\n```\nwill not instrument `f`.\n\n\n\n## Example Code\n\nTo get you started, take a look at `test/test-nvtx.py`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjblaschke%2Fpynvtx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjblaschke%2Fpynvtx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjblaschke%2Fpynvtx/lists"}