google / google/grain

`MapDataset` does not respect `jax.default_device(jax.devices("cpu")[0])`.

Open
#975 3 comments 1 reaction 0 assignees View on GitHub
type:bug
Dominant language
Python
Stars
779
Forks
86
Avg merge
2d 6h
Merged PRs (30d)
6

Description

I would like to use CPU only for the transforms using `jax.numpy`.

However, I’ve found that `MapDataset` does not respect `jax.default_device(jax.devices("cpu")[0])`.

You can see a clear demonstration of this issue in the following Colab notebook:
https://colab.research.google.com/drive/1hRfWBe8a09bPNnXSVjeLvcrYjoqcUA2b?usp=sharing

Is there a reason for this behavior?
Could this be a bug?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.