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
Add GPU tests for CUDA, AMDGPU, and OpenCL backends (#205)
* Add CLAUDE.md documentation file
Adds comprehensive documentation for Claude Code users including:
- Project structure overview
- Development commands for testing and documentation
- Key dependencies and version requirements
- Contributing guidelines
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Add code formatting guidelines to CLAUDE.md
Includes:
- Commands to remove trailing whitespaces from .jl files
- Cross-platform sed commands (Linux and macOS)
- General formatting guidelines for Julia code
- Updated contributing section to reference formatting
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Add GPU tests for CUDA, AMDGPU, and OpenCL backends
Implements comprehensive GPU testing infrastructure:
- GPU test structure based on QuantumClifford.jl patterns
- Support for CUDA, AMDGPU (ROCm), and OpenCL backends
- Basic operations testing: operators, kets, bras
- Matrix operations: multiplication, adjoint, trace, norm
- Test filtering by environment variables (CUDA_TEST, AMDGPU_TEST, OpenCL_TEST)
- Buildkite CI configuration for automated GPU testing
- Uses Adapt.jl for seamless CPU-GPU array adaptation
Tests verified working locally with OpenCL backend.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Update CLAUDE.md with master version and add pull requirement
- Uses CLAUDE.md content from master branch to resolve conflicts
- Adds requirement to pull latest changes before starting new features
- Emphasizes keeping repository up to date in contributing guidelines
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Improve test setup and add branch pull requirement to CLAUDE.md
- Add Pkg to test/Project.toml for proper dependency management
- Remove manual TestItemRunner addition (already in test environment)
- Update CLAUDE.md with branch pull requirement
- Recommend using Pkg.test() over direct runtests.jl calls
- Add examples for GPU-specific test commands
- All 61 OpenCL tests passing with new setup
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Remove incorrect alternative test command from CLAUDE.md
The direct runtests.jl approach was incorrect and shouldn't be recommended.
Only Pkg.test() provides the proper test environment.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Add newline formatting guidelines and fix missing newlines
- Add section in CLAUDE.md for ensuring files end with newlines
- Provide sed command to add missing newlines: `sed -i '$a\' *.jl`
- Apply the command to fix existing files missing newlines
- Update formatting guidelines to emphasize proper file endings
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* manual changes
* Revert formatting-only changes and add PR focus guideline
Remove newline additions from 28 test files that were not part of the GPU tests feature.
Add guideline to CLAUDE.md about keeping PRs focused and avoiding mixing feature work
with formatting changes to unrelated files.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* minor clarifications
* comment out the AMDGPU tests
---------
Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Stefan Krastanov <[email protected]>
Co-authored-by: Stefan Krastanov <[email protected]>
Copy file name to clipboardExpand all lines: CLAUDE.md
+20-2Lines changed: 20 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,11 @@ QuantumOpticsBase.jl provides the base functionality for QuantumOptics.jl. It im
21
21
```bash
22
22
# Run all tests
23
23
julia --project=. -e "using Pkg; Pkg.test()"
24
+
25
+
# Run with only specific GPU backend tests
26
+
CUDA_TEST=true julia --project=. -e "using Pkg; Pkg.test()"
27
+
AMDGPU_TEST=true julia --project=. -e "using Pkg; Pkg.test()"
28
+
OpenCL_TEST=true julia --project=. -e "using Pkg; Pkg.test()"
24
29
```
25
30
26
31
### Building Documentation
@@ -84,13 +89,21 @@ Special test configurations:
84
89
## Code Formatting
85
90
86
91
### Removing Trailing Whitespaces
87
-
Before committing, ensure there are no trailing whitespaces in Julia files:
92
+
Before committing, ensure there are no trailing whitespaces in Julia files. Do not format files that are not part of the specific feature under development.
88
93
89
94
```bash
90
95
# Remove trailing whitespaces from all .jl files (requires gnu tools)
91
96
find . -type f -name '*.jl' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
92
97
```
93
98
99
+
### Ensuring Files End with Newlines
100
+
Ensure all Julia files end with a newline to avoid misbehaving CLI tools. Do not format files that are not part of the specific feature under development.
101
+
102
+
```bash
103
+
# Add newline to end of all .jl files that don't have one
104
+
find . -type f -name '*.jl' -exec sed -i '$a\' {} \+
105
+
```
106
+
94
107
### General Formatting Guidelines
95
108
- Use 4 spaces for indentation (no tabs)
96
109
- Remove trailing whitespaces from all lines
@@ -101,8 +114,13 @@ find . -type f -name '*.jl' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
101
114
## Contributing
102
115
103
116
This package follows standard Julia development practices:
117
+
-**Always pull latest changes first**: Before creating any new feature or starting work, ensure you have the latest version by running `git pull origin master` (or `git pull origin main`)
118
+
-**Pull before continuing work**: Other maintainers might have modified the branch you are working on. Always call `git pull` before continuing work on an existing branch
119
+
-**Push changes to remote**: Always push your local changes to the remote branch to keep the PR up to date: `git push origin <branch-name>`
120
+
-**Run all tests before submitting**: Before creating or updating a PR, always run the full test suite to ensure nothing is broken: `julia --project=. -e "using Pkg; Pkg.test()"`
104
121
- Fork and create feature branches
105
122
- Write tests for new functionality
106
123
- Ensure documentation builds successfully
107
124
- Follow code formatting guidelines above
108
-
- All tests must pass before merging
125
+
- All tests must pass before merging
126
+
-**Keep PRs focused**: A PR should implement one self-contained change. Avoid mixing feature work with formatting changes to unrelated files, even for improvements like adding missing newlines. Format unrelated files in separate commits or PRs.
0 commit comments