Closed dkgaraujo closed 11 months ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Another thing I would mention is that the instructions for macOS users could be updated to reflect that access to GPU requires setting another environment variable as follows:
import os
os.environ[“KERAS_BACKEND”] = “torch”
os.environ[“PYTORCH_ENABLE_MPS_FALLBACK”] = “1”
import keras_core as keras
Patch coverage: 100.00%
and no project coverage change.
Comparison is base (
f350416
) 76.00% compared to head (ae75181
) 76.00%. Report is 2 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I signed the CLA - I'm not sure if I should take another step to officially pass that check.
As mentioned in keras-team/keras#18437, one remaining change from keras-team/keras-core#750 is to first move the torch tensor to the CPU before passing it to a numpy array.
This is relevant for the Metal GPU case. While calling
.cpu()
is harmless on a torch tensor already in the CPU, in my observation directly moving the tensor from Metal to numpy returns an error, hence the need to move it first.