add yaml dependencies for mps #2
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hej,
I have mac with mps, the current yaml files does support the m-chip mac machines.
However, I solved this but edit the file and make it appropriate for mac with m-chip. The solutions is as follows:
I have created a file called conda-environment-files/conda-environment-gpu-mac-mps.yml. Then, I have followed the same instructions to create the environment, but I have an error which was expected because of conda and pip packages. The error is as follows:
This can be solved easily by setting an environment variable to True as:
or in the python file as:
After that, I have tested the gpu and it worked well. The following code was used to test the setup:
I got the following results:
MPS is available tensor([1.], device='mps:0') Forward pass took 0.1280 seconds on mpsSo, simply we need to add the file to directory and set KMP_DUPLICATE_LIB_OK variable to True. This PR resolve #1