{"id":16360076,"url":"https://github.com/frgfm/torch-cuda-template","last_synced_at":"2025-07-31T02:07:48.256Z","repository":{"id":110056677,"uuid":"293923809","full_name":"frgfm/torch-cuda-template","owner":"frgfm","description":"Template for CUDA / C++ extension writing with PyTorch","archived":false,"fork":false,"pushed_at":"2020-09-09T12:55:44.000Z","size":15,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-22T13:07:11.303Z","etag":null,"topics":["cpp","cuda","pytorch","pytorch-extension"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frgfm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-08T20:47:59.000Z","updated_at":"2024-07-15T09:23:15.000Z","dependencies_parsed_at":"2023-05-20T21:00:35.567Z","dependency_job_id":null,"html_url":"https://github.com/frgfm/torch-cuda-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgfm%2Ftorch-cuda-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgfm%2Ftorch-cuda-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgfm%2Ftorch-cuda-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgfm%2Ftorch-cuda-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frgfm","download_url":"https://codeload.github.com/frgfm/torch-cuda-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228330159,"owners_count":17903019,"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","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":["cpp","cuda","pytorch","pytorch-extension"],"created_at":"2024-10-11T02:10:29.685Z","updated_at":"2024-12-05T17:45:35.389Z","avatar_url":"https://github.com/frgfm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# torch-cuda-template\n[![License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](LICENSE) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/9a56f466d21f4dbf8de677fd5b8709d3)](https://www.codacy.com/manual/frgfm/torch-cuda-template?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=frgfm/torch-cuda-template\u0026amp;utm_campaign=Badge_Grade)![Build Status](https://github.com/frgfm/torch-cuda-template/workflows/python-package/badge.svg) [![codecov](https://codecov.io/gh/frgfm/torch-cda-template/branch/master/graph/badge.svg)](https://codecov.io/gh/frgfm/torch-cuda-template) \n\n\n\nTemplate for CUDA / C++ extension writing with PyTorch\n\n\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [Credits](#credits)\n- [License](#license)\n\n\n\n## Getting started\n\n### Prerequisites\n\n- Python 3.6 (or more recent)\n- [pip](https://pip.pypa.io/en/stable/)\n\n### Installation\n\nYou can install the package using the default method:\n\n```bash\npip install -e . --upgrade\n```\n\nwhich will build the CUDA extension and bind it with your python module.\n\n\n\n## Usage\n\nThis python package can be used like any other:\n\n```python\nimport torch\nimport cuda_ext.nn as nn\n\nmy_module = nn.DSigmoid()\n\nwith torch.no_grad():\n\tout = my_module(torch.rand(2, 3, 32, 32).cuda())\n```\n\n\n\n## Contributing\n\nPlease refer to `CONTRIBUTING` if you wish to contribute to this project.\n\n\n\n## Credits\n\nThe content of this repo was brought together by the repo owner but highly benefited from the following resources:\n\n- CUDA extensions of [Thomas Brandon](https://github.com/thomasbrandon)\n- Official PyTorch [documentation](https://pytorch.org/tutorials/advanced/cpp_extension.html)\n\n\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrgfm%2Ftorch-cuda-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrgfm%2Ftorch-cuda-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrgfm%2Ftorch-cuda-template/lists"}