Skip to content

Conversation

@kulinseth
Copy link
Collaborator

Add check for macos 13.0

Fixes #88487

@kulinseth kulinseth requested a review from malfet November 5, 2022 00:15
@pytorch-bot pytorch-bot bot added ciflow/mps Run MPS tests (subset of trunk) release notes: mps Release notes category labels Nov 5, 2022
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 5, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/88532

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 Failures

As of commit 14944cc:

FLAKY - The following jobs failed but were likely due to flakiness present on master:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 5, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: kulinseth / name: Kulin Seth (cb41cf9)

@ngimel ngimel added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Nov 10, 2022
@kulinseth
Copy link
Collaborator Author

@malfet , rebased . Please give it a review.

@malfet
Copy link
Contributor

malfet commented Nov 21, 2022

/easycla

Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Major areas of concern:

  • Large tensors (add overflow checks when computing number of elements)
  • For the CPU fallbacks, aren't results needed to be copied back to MPS?

Nits:

  • Formatting: if () block should always be surrounded by { and don't one needs spaces after objc argument name?
  • std::array vs NSArray (this way one can avoid [NSNull null])

@kulinseth
Copy link
Collaborator Author

/easycla

@DenisVieriu97
Copy link
Collaborator

@pytorchbot merge -g

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jan 3, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks on your PR pass since you used the green (-g) flag (ETA: 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@jkoudys
Copy link

jkoudys commented Jan 4, 2023

I'm building this branch myself, and I get this warning an awful lot:

clang: warning: argument unused during compilation: '-mfpu=neon' [-Wunused-command-line-argument]

on my macos 13.2 M1. I'm building the usual recommended pytorch way:

CC=clang CXX=clang++ python3 setup.py develop

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 2 additional jobs have failed, first few of them are: trunk ,trunk / linux-focal-rocm5.3-py3.8 / test (default, 1, 2, linux.rocm.gpu)

Details for Dev Infra team Raised by workflow job

@DenisVieriu97
Copy link
Collaborator

@pytorchbot merge -f "Lint+MPS is green"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: Command git -C /home/runner/work/pytorch/pytorch merge --squash __pull-request-88532__init__ returned non-zero exit code 1

Auto-merging aten/src/ATen/native/native_functions.yaml
Auto-merging test/test_mps.py
CONFLICT (content): Merge conflict in test/test_mps.py
Squash commit -- not updating HEAD
Automatic merge failed; fix conflicts and then commit the result.
Details for Dev Infra team Raised by workflow job

@DenisVieriu97
Copy link
Collaborator

@pytorchbot merge -g

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks on your PR pass since you used the green (-g) flag (ETA: 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 2 additional jobs have failed, first few of them are: trunk ,trunk / linux-focal-rocm5.3-py3.8 / test (default, 2, 2, linux.rocm.gpu)

Details for Dev Infra team Raised by workflow job

@DenisVieriu97
Copy link
Collaborator

@pytorchbot merge -f "Lint+MPS is green"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@DenisVieriu97
Copy link
Collaborator

@jkoudys this change should get into the next pytorch nightly binary - could you please try that and let me know if you see any issues?

@tj-safely
Copy link

Is this merged on master? It looks like it is, but I am unable to use the op in yolov5 and pytorch 1.13.1, and I have tested on the nightly too.

@DenisVieriu97
Copy link
Collaborator

@tj-safely nightly builds should have them. Can you try doing a force reinstall to make sure it got installed properly? pip3 install --pre --force-reinstall torch --index-url https://download.pytorch.org/whl/nightly/cpu

@tj-safely
Copy link

tj-safely commented Feb 22, 2023

@DenisVieriu97 I have tried a few different methods for installing a matching torchvision package to no success.

Right now I have this:

torch                   2.0.0.dev20230220
torchaudio              2.0.0.dev20230221
torchvision             0.15.0a0+a46d97c

And get this error message:

File "/Users/tj/yolov5/utils/general.py", line 975, in non_max_suppression
  i = torchvision.ops.nms(boxes, scores, iou_thres)  # NMS
File "/Users/tj/opt/anaconda3/envs/yolo_t3/lib/python3.10/site-packages/torchvision/ops/boxes.py", line 40, in nms
  _assert_has_ops()
File "/Users/tj/opt/anaconda3/envs/yolo_t3/lib/python3.10/site-packages/torchvision/extension.py", line 48, in _assert_has_ops
  raise RuntimeError(
RuntimeError: Couldn't load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. For further information on the compatible versions, check https://github.com/pytorch/vision#installation for the compatibility matrix. Please check your PyTorch version with torch.

When I add torchvision to your command or try with only torchvision, it attempts to install many different versions of torchvision and does not install any of them.
It says they depend on numpy and pillow which I have:

numpy==1.24.2
pillow==9.3.0

Finally, I have this torchvision version installed by running this command:
pip install git+https://github.com/pytorch/vision.git

which I found from this link:
https://github.com/pytorch/vision/issues/833

Thank you for your help and further guidance is appreciated.

@DenisVieriu97
Copy link
Collaborator

@tj-safely try uninstalling all previous packages of torch/torchvision/torchaudio, then do a clean install.
E.g execute the following in a terminal (in your environment):

for i in {1..20}; do pip uninstall -y torch torchvision torchaudio; done

then:

pip3 install --pre --force-reinstall torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu

@tj-safely
Copy link

I am still unable to install torchvision this way. To reproduce:
conda create -n yolo python
conda activate yolo

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

pip3 install -r requirements.txt
for i in {1..20}; do pip uninstall -y torch torchvision torchaudio; done
pip3 install --pre --force-reinstall torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu

Everything works successfully until the last command:

Looking in indexes: https://download.pytorch.org/whl/nightly/cpu
Collecting torch
  Using cached https://download.pytorch.org/whl/nightly/cpu/torch-2.0.0.dev20230220-cp310-none-macosx_10_9_x86_64.whl (140.0 MB)
Collecting torchvision
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230223-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
Collecting torchaudio
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchaudio-2.0.0.dev20230223-cp310-cp310-macosx_10_9_x86_64.whl (3.9 MB)
Collecting networkx
  Using cached https://download.pytorch.org/whl/nightly/networkx-3.0rc1-py3-none-any.whl (2.0 MB)
Collecting sympy
  Using cached https://download.pytorch.org/whl/nightly/sympy-1.11.1-py3-none-any.whl (6.5 MB)
Collecting typing-extensions
  Using cached https://download.pytorch.org/whl/nightly/typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting filelock
  Using cached https://download.pytorch.org/whl/nightly/filelock-3.9.0-py3-none-any.whl (9.7 kB)
Collecting requests
  Using cached https://download.pytorch.org/whl/nightly/requests-2.28.1-py3-none-any.whl (62 kB)
Collecting torchvision
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230222-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230221-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230220-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230219-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230218-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230217-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230216-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230215-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230214-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230213-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230212-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230211-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230210-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230209-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230208-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230207-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230206-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230205-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230204-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230203-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230202-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230201-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230131-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230130-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230129-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230128-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230127-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230126-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230125-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230124-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230123-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230122-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230121-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230120-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230119-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230118-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230117-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230116-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230115-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230114-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230113-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230112-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230111-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230110-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230109-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230108-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230107-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230106-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230105-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230104-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230103-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230102-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20230101-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20221231-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB)
  Using cached https://download.pytorch.org/whl/nightly/torchvision-0.14.0.dev20220816-cp310-cp310-macosx_10_9_x86_64.whl (1.5 MB)
  Using cached https://download.pytorch.org/whl/nightly/torchvision-0.14.0.dev20220815-cp310-cp310-macosx_10_9_x86_64.whl (1.5 MB)
  Using cached https://download.pytorch.org/whl/nightly/torchvision-0.14.0.dev20220814-cp310-cp310-macosx_10_9_x86_64.whl (1.5 MB)
  Using cached https://download.pytorch.org/whl/nightly/torchvision-0.14.0.dev20220813-cp310-cp310-macosx_10_9_x86_64.whl (1.5 MB)
  Using cached https://download.pytorch.org/whl/nightly/torchvision-0.14.0.dev20220812-cp310-cp310-macosx_10_9_x86_64.whl (1.5 MB)
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of torch to determine which version is compatible with other requirements. This could take a while.
Collecting torch
  Using cached https://download.pytorch.org/whl/nightly/cpu/torch-2.0.0.dev20230219-cp310-none-macosx_10_9_x86_64.whl (140.0 MB)
ERROR: Cannot install torchvision==0.14.0.dev20220812, torchvision==0.14.0.dev20220813, torchvision==0.14.0.dev20220814, torchvision==0.14.0.dev20220815, torchvision==0.14.0.dev20220816, torchvision==0.15.0.dev20221231, torchvision==0.15.0.dev20230101, torchvision==0.15.0.dev20230102, torchvision==0.15.0.dev20230103, torchvision==0.15.0.dev20230104, torchvision==0.15.0.dev20230105, torchvision==0.15.0.dev20230106, torchvision==0.15.0.dev20230107, torchvision==0.15.0.dev20230108, torchvision==0.15.0.dev20230109, torchvision==0.15.0.dev20230110, torchvision==0.15.0.dev20230111, torchvision==0.15.0.dev20230112, torchvision==0.15.0.dev20230113, torchvision==0.15.0.dev20230114, torchvision==0.15.0.dev20230115, torchvision==0.15.0.dev20230116, torchvision==0.15.0.dev20230117, torchvision==0.15.0.dev20230118, torchvision==0.15.0.dev20230119, torchvision==0.15.0.dev20230120, torchvision==0.15.0.dev20230121, torchvision==0.15.0.dev20230122, torchvision==0.15.0.dev20230123, torchvision==0.15.0.dev20230124, torchvision==0.15.0.dev20230125, torchvision==0.15.0.dev20230126, torchvision==0.15.0.dev20230127, torchvision==0.15.0.dev20230128, torchvision==0.15.0.dev20230129, torchvision==0.15.0.dev20230130, torchvision==0.15.0.dev20230131, torchvision==0.15.0.dev20230201, torchvision==0.15.0.dev20230202, torchvision==0.15.0.dev20230203, torchvision==0.15.0.dev20230204, torchvision==0.15.0.dev20230205, torchvision==0.15.0.dev20230206, torchvision==0.15.0.dev20230207, torchvision==0.15.0.dev20230208, torchvision==0.15.0.dev20230209, torchvision==0.15.0.dev20230210, torchvision==0.15.0.dev20230211, torchvision==0.15.0.dev20230212, torchvision==0.15.0.dev20230213, torchvision==0.15.0.dev20230214, torchvision==0.15.0.dev20230215, torchvision==0.15.0.dev20230216, torchvision==0.15.0.dev20230217, torchvision==0.15.0.dev20230218, torchvision==0.15.0.dev20230219, torchvision==0.15.0.dev20230220, torchvision==0.15.0.dev20230221, torchvision==0.15.0.dev20230222 and torchvision==0.15.0.dev20230223 because these package versions have conflicting dependencies.

The conflict is caused by:
    torchvision 0.15.0.dev20230223 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230222 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230221 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230220 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230219 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230218 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230217 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230216 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230215 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230214 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230213 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230212 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230211 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230210 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230209 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230208 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230207 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230206 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230205 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230204 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230203 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230202 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230201 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230131 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230130 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230129 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230128 depends on pillow!=8.3.* and >=5.3.0
    torchvision 0.15.0.dev20230127 depends on numpy
    torchvision 0.15.0.dev20230126 depends on numpy
    torchvision 0.15.0.dev20230125 depends on numpy
    torchvision 0.15.0.dev20230124 depends on numpy
    torchvision 0.15.0.dev20230123 depends on numpy
    torchvision 0.15.0.dev20230122 depends on numpy
    torchvision 0.15.0.dev20230121 depends on numpy
    torchvision 0.15.0.dev20230120 depends on numpy
    torchvision 0.15.0.dev20230119 depends on numpy
    torchvision 0.15.0.dev20230118 depends on numpy
    torchvision 0.15.0.dev20230117 depends on numpy
    torchvision 0.15.0.dev20230116 depends on numpy
    torchvision 0.15.0.dev20230115 depends on numpy
    torchvision 0.15.0.dev20230114 depends on numpy
    torchvision 0.15.0.dev20230113 depends on numpy
    torchvision 0.15.0.dev20230112 depends on numpy
    torchvision 0.15.0.dev20230111 depends on numpy
    torchvision 0.15.0.dev20230110 depends on numpy
    torchvision 0.15.0.dev20230109 depends on numpy
    torchvision 0.15.0.dev20230108 depends on numpy
    torchvision 0.15.0.dev20230107 depends on numpy
    torchvision 0.15.0.dev20230106 depends on numpy
    torchvision 0.15.0.dev20230105 depends on numpy
    torchvision 0.15.0.dev20230104 depends on numpy
    torchvision 0.15.0.dev20230103 depends on numpy
    torchvision 0.15.0.dev20230102 depends on numpy
    torchvision 0.15.0.dev20230101 depends on numpy
    torchvision 0.15.0.dev20221231 depends on numpy
    torchvision 0.14.0.dev20220816 depends on numpy
    torchvision 0.14.0.dev20220815 depends on numpy
    torchvision 0.14.0.dev20220814 depends on numpy
    torchvision 0.14.0.dev20220813 depends on numpy
    torchvision 0.14.0.dev20220812 depends on numpy

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

@DenisVieriu97
Copy link
Collaborator

DenisVieriu97 commented Feb 24, 2023

@tj-safely could you please try installing only torchvision and torch?
pip3 install --pre --force-reinstall torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu. I've tried this combination locally and it seems to be working - let me know if you still see any issues

@tj-safely
Copy link

@tj-safely could you please try installing only torchvision and torch? pip3 install --pre --force-reinstall torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu. I've tried this combination locally and it seems to be working - let me know if you still see any issues

This worked. For some reason mps is sometimes slower than cpu on yolov5, but I do not get exceptions anymore.

Thank you so much for you help!

@malfet malfet mentioned this pull request Oct 23, 2023
malfet added a commit that referenced this pull request Feb 1, 2024
And use convenient methods

TODO was added by an accidental copy-n-paste of code from #82315 into  #88532
pytorchmergebot pushed a commit that referenced this pull request Feb 1, 2024
And use convenient methods

TODO was added by an accidental copy-n-paste of code from #82315 into  #88532

Pull Request resolved: #118902
Approved by: https://github.com/kit1980
pytorch-bot bot pushed a commit that referenced this pull request Feb 8, 2024
And use convenient methods

TODO was added by an accidental copy-n-paste of code from #82315 into  #88532

Pull Request resolved: #118902
Approved by: https://github.com/kit1980
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/mps Run MPS tests (subset of trunk) ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: mps Release notes category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MPS] Add support for aten::unique_consecutive for MPS backend

8 participants