https://github.com/yaoyinying/nvtx-mock
A work around of NVTX installing to MacOS
https://github.com/yaoyinying/nvtx-mock
Last synced: 4 months ago
JSON representation
A work around of NVTX installing to MacOS
- Host: GitHub
- URL: https://github.com/yaoyinying/nvtx-mock
- Owner: YaoYinYing
- License: mit
- Created: 2024-05-14T07:49:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-15T05:04:14.000Z (over 1 year ago)
- Last Synced: 2025-01-10T14:01:47.688Z (9 months ago)
- Language: Python
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NVTX-Mock: A Mock for NVTX on Non-CUDA Platforms
NVTX-Mock is a Python package that enables using the NVIDIA NVTX (NVIDIA Tools Extension Library) on platforms without CUDA support, such as macOS. It provides a mock implementation of the NVTX C headers, allowing you to develop and test your code that uses NVTX markers and ranges on these platforms.
## Features
- Mocks the NVTX C headers for non-CUDA platforms like macOS.
- Enables cross-platform development and testing of NVTX-enabled code.
- Installs the mock NVTX headers to the Python installation's `include` directory.## Requirements
- Python 3.6 or later
## Installation
You can install NVTX-Mock directly from the GitHub repository using `pip`:
```sh
pip install git+https://github.com/YaoYinYing/nvtx-mock --force-reinstall
```
This command will clone the repository, build the package, and install it, copy those NVTX headers to Python's `include` directory.
```shell
ls $(dirname $(which python))/../include |grep nvtx
```After that, you can install the Python-binding of NVTX:
```sh
pip install nvtx
```
This will install the genuine NVTX library, and your code will function as expected.## Usage
When running NVTX-enabled code on a non-CUDA platform, include the NVTX headers as usual.
Since NVTX-Mock provides a mock implementation, the NVTX functions will have no effect, but your code will compile and run without errors.## Contributing
Contributions are welcome! Please fork the repository, make your changes, and submit a pull request.## License
NVTX-Mock is licensed under the MIT License. See the LICENSE file for more details.## Acknowledgments
NVIDIA for providing the NVTX library.