You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,22 @@ When requesting features:
111
111
- Provide examples of how it would be used
112
112
- Discuss potential implementation approaches
113
113
114
+
## External Project Tests
115
+
116
+
Feel free to try other projects using TorchDevice. If you find issues, please report them as GitHub issues, or submit a patch with a fix in a PR. I cannot guarantee that all projects will work, and I may not be able to get to every test project, but I appreciate the assistance in debugging and making this work better for the community.
117
+
118
+
### PyTorch Transformers
119
+
120
+
Checkout the [test_automation/README.md](test_automation/README.md) for instructions on running the PyTorch Transformers test suite. For how to manage external projects, see [Managing Test Target Projects](#managing-test-target-projects).
Copy file name to clipboardExpand all lines: README.md
+32-4Lines changed: 32 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ A Python library for transparent device handling in PyTorch, enabling seamless t
6
6
7
7
## Overview
8
8
9
-
TorchDevice provides transparent device handling for PyTorch applications, allowing code written for CUDA to run on MPS devices (and vice versa) without modification. It intercepts device-specific calls and redirects them appropriately based on available hardware.
9
+
TorchDevice provides transparent device handling for PyTorch applications, allowing code written for CUDA to run on MPS devices (and vice versa) without modification. It intercepts device-specific calls and redirects them appropriately based on available hardware. This is primarily for migration of existing CUDA code and running existing CUDA code on Apple Silicon Macs.
import TorchDevice # This automatically hooks into PyTorch
36
+
import TorchDevice # This automatically hooks into PyTorch, order not important.
34
37
import torch
35
38
36
39
# Your existing PyTorch code works as is
37
40
model = torch.nn.Linear(10, 10).cuda() # Will use MPS if CUDA isn't available
38
41
```
39
42
43
+
**NOTE:** The project is under active development and produces very verbose logs, so you may want to redirect them to a file or `/dev/null`. I will be working on reducing the verbosity in the future.
44
+
40
45
## Project Structure
41
46
42
47
The project is organized into three main components:
@@ -53,6 +58,7 @@ For detailed structure information, see [Project Structure](docs/project_structu
53
58
-[TorchDevice Behavior](docs/TorchDevice_Behavior.md): Core functionality and behavior
54
59
-[API Reference](docs/TorchDevice_Functions.md): Comprehensive API documentation
If you wish to contribute create a branch and then submit a PR for your changes. I will review them and merge them into the dev branch and then into the main branch as I get to them. I will try to get to them as soon as possible. I appreciate all contributions to making this better.
112
+
93
113
For comprehensive integration testing against large codebases like Hugging Face Transformers, a dedicated test automation suite is available. This suite manages complex test execution, logging, and reporting. For detailed instructions on setup, dependencies, and usage, please see the dedicated guide:
94
114
95
115
[**Advanced Test Automation README**](test_automation/README.md)
96
116
117
+
The latest test reports are in the [test_automation/reports](test_automation/reports) directory. Feel free to have a look and let me know if you have any questions or suggestions. If you have any fixes, please submit a PR.
118
+
97
119
## Contributing
98
120
99
121
We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.
100
122
123
+
It has additional information on testing other projects with TorchDevice, though I have mostly tested and am working on debugging the issues with HuggingFace Transformers. For now, I am focused on getting the core functionality working. Right now about 13% of the tests are failing and many of those are due to CUDA specific functionality in the CUDA library.
124
+
125
+
This is not my primary project I am working on, but I am using it for other projects I am working on, giving me access to available PyTorch code written for CUDA and saving time in having to port code over to Apple Silicon.
126
+
101
127
## Supporting This Project
102
128
103
-
TorchDevice is an open-source project developed and maintained by [Michael P. Sullivan (unixwzrd)](https://unixwzrd.ai). If you find this project useful, please consider supporting its development:
129
+
TorchDevice is an open-source project developed and maintained by [me, M S - unixwzrd](https://unixwzrd.ai). It has evolved and grown over the past 9 months from when it was first conceived, and is now relatively stable and useful for running PyTorch CUDA code on Apple Silicon, and I have tested it with a number of projects. Some projects having to do with Text-to-Speech and other AI/ML projects. My goal right now is to have the HuggingFace Transformers library working with it as much as possible.
130
+
131
+
If you find this project useful, please consider supporting its development:
0 commit comments