Skip to content

Commit

Permalink
dev(hansbug): disable torch.compile on windows, install libomp for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
HansBug committed Apr 16, 2023
1 parent fc627ee commit 1fef868
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
shell: bash
run: |
brew install tree cloc wget curl make zip graphviz
brew install libomp
dot -V
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down
4 changes: 2 additions & 2 deletions test/tree/integration/test_torch.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from unittest import skipUnless

import pytest
from hbutils.testing import vpip
from hbutils.testing import vpip, OS

from treevalue import FastTreeValue, register_for_torch

Expand Down Expand Up @@ -62,7 +62,7 @@ class MyTreeValueX(FastTreeValue):
with pytest.warns(UserWarning):
register_for_torch(MyTreeValueX)

@skipUnless(vpip('torch') >= '2.0.0', 'Torch 2 required')
@skipUnless(vpip('torch') >= '2.0.0' and not OS.windows, 'Torch 2 on non-windows platform required')
def test_torch_compile(self):
@torch.compile
def foo(x, y, t):
Expand Down

0 comments on commit 1fef868

Please sign in to comment.