diff --git a/.github/scripts/unittest.sh b/.github/scripts/unittest.sh index 8f0ad92218c..fc4cb8f2796 100755 --- a/.github/scripts/unittest.sh +++ b/.github/scripts/unittest.sh @@ -8,7 +8,8 @@ set -euo pipefail eval "$($(which conda) shell.bash hook)" && conda deactivate && conda activate ci echo '::group::Install testing utilities' -pip install --progress-bar=off pytest pytest-mock pytest-cov expecttest!=0.2.0 +# TODO: remove the <8 constraint on pytest when https://github.com/pytorch/vision/issues/8238 is closed +pip install --progress-bar=off "pytest<8" pytest-mock pytest-cov expecttest!=0.2.0 echo '::endgroup::' python test/smoke_test.py diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eb6290fdfe9..bd483db6e4b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -164,7 +164,8 @@ jobs: echo '::endgroup::' echo '::group::Install testing utilities' - pip install --progress-bar=off pytest + # TODO: remove the <8 constraint on pytest when https://github.com/pytorch/vision/issues/8238 is closed + pip install --progress-bar=off "pytest<8" echo '::endgroup::' echo '::group::Run extended unittests' diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cd485d7a24..8798b64351d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,6 +96,12 @@ ENDFOREACH() add_library(${PROJECT_NAME} SHARED ${ALL_SOURCES}) target_link_libraries(${PROJECT_NAME} PRIVATE ${TORCH_LIBRARIES}) +if(WITH_MPS) + find_library(metal NAMES Metal) + find_library(foundation NAMES Foundation) + target_link_libraries(${PROJECT_NAME} PRIVATE ${metal} ${foundation}) +endif() + if (WITH_PNG) target_link_libraries(${PROJECT_NAME} PRIVATE ${PNG_LIBRARY}) endif()