Conversation
38038bf to
acb3d2a
Compare
acb3d2a to
74ea2e7
Compare
74ea2e7 to
c1e193e
Compare
.github/workflows/test.yml
Outdated
| TEST_PATH="." | ||
| EXTRA_FLAGS="--ignore=test/test_examples_dist.py" | ||
| PARALLEL="" | ||
| elif [[ "${{ matrix.alias }}" == "m2-metal" ]]; then |
There was a problem hiding this comment.
You dont need this, above sets HELION_BACKEND=metal and that should cover this
There was a problem hiding this comment.
It collects all tests in "." and I was worried that there might be imports which cannot be resolved in mac. Checking if any imports cannot be resolved...
There was a problem hiding this comment.
if there are imports that cannot be resolved, then they should be guarded by the backend. i.e. pallas backend cannot import triton, so all triton imports are guarded
There was a problem hiding this comment.
You dont need this, above sets HELION_BACKEND=metal and that should cover this
@oulgen -- just to clarify:
- are you suggesting to not add a conditional here? If I don't, by default, we try to run all tests in the folder (incl test_metal.py), but a bunch of tests fail to import triton on mac and several more fail to find CUDA and fail. We will need to touch-up these files to exit gracefully on mac?
Or, 2) are you suggesting to use HELION_BACKEND in the condition's expression?
There was a problem hiding this comment.
I have done (2) in the recent commit. PTAL
There was a problem hiding this comment.
Each test file is guarded by @onlybackend decorator. So metal would only run metal tests. You dont need this if block at all. Try running locally HELION_BACKEND=metal pytest test and you'll see
There was a problem hiding this comment.
Ah thanks for clarifying! Didn’t know that. Will try it and amend this PR
There was a problem hiding this comment.
Modified as suggested.
I had to skip a few tests that fail on Metal due to some missing feature not yet added
d4395e8 to
065e6d8
Compare
065e6d8 to
eb80c4b
Compare
eb80c4b to
4b81409
Compare
4b81409 to
087ce82
Compare
087ce82 to
c0b4d5b
Compare
c0b4d5b to
1b74bae
Compare
Add a macOS Metal entry to matrix.json (macos-m2-26, cpu runtime, metal backend) and update test.yml to handle macOS: - Gate apt-get on runner.os == 'Linux' - Add cpu runtime branch for PyTorch install - Add MPS availability check for metal backend - Run full test suite for metal (most tests skip via requires_gpu) - Skip grid range tests that need loop_index_expr stack-info: PR: #1862, branch: aditvenk/stack/24
Stacked PRs:
Add Metal test job to CI test matrix
Add a macOS Metal entry to matrix.json (macos-m2-26, cpu runtime,
metal backend) and update test.yml to handle macOS: