Tensorflow global random generator is unable to generate integers
Hi @estenhl ,

The issue exists only on Mac M1/M2 it seems.I have replicated the issue on Mac M1.

```
(tf-metal) suryanarayanay-macbookpro:~ suryanarayanay$ python 60597.py
2.14.0-dev20230515
Metal device set to: Apple M1 Pro

systemMemory: 16.00 GB
maxCacheSize: 5.33 GB

Traceback (most recent call last):
  File "/Users/suryanarayanay/60597.py", line 17, in <module>
    generator.uniform(shape=(), minval=0, maxval=3, dtype=tf.int32)
  File "/Users/suryanarayanay/miniconda/envs/tf-metal/lib/python3.9/site-packages/tensorflow/python/ops/stateful_random_ops.py", line 788, in uniform
    return gen_stateless_random_ops_v2.stateless_random_uniform_int_v2(
  File "/Users/suryanarayanay/miniconda/envs/tf-metal/lib/python3.9/site-packages/tensorflow/python/ops/gen_stateless_random_ops_v2.py", line 477, in stateless_random_uniform_int_v2
    _ops.raise_from_not_ok_status(e, name)
  File "/Users/suryanarayanay/miniconda/envs/tf-metal/lib/python3.9/site-packages/tensorflow/python/framework/ops.py", line 6577, in raise_from_not_ok_status
    raise core._status_to_exception(e) from None  # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__StatelessRandomUniformIntV2_device_/job:localhost/replica:0/task:0/device:GPU:0}} minval must be 0-D, got shape [2]
	 [[{{node StatelessRandomUniformIntV2}}]] [Op:StatelessRandomUniformIntV2] name: 
(tf-metal) suryanarayanay-macbookpro:~ suryanarayanay$ 
```
However on Colal(Linux) the code executes fine as per [gist](https://colab.research.google.com/gist/SuryanarayanaY/77af814354eb337fee46527856a30f39/60597.ipynb).

Since Mac M1 installs Apple's TF Package the issue needs to be addressed by Apple itself.Please report the issue [here](https://developer.apple.com/forums/tags/tensorflow-metal).

Thanks! Ah, of course, thanks for looking into it! Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60597">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60597">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

binary

### Tensorflow Version

2.14.0-dev20230514

### Custom Code

Yes

### OS Platform and Distribution

macOS Ventura 13.2.1

### Mobile device

_No response_

### Python version

3.10.9

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

Apple M2

### Current Behaviour?

An error is raised when trying to generate a random integer using the global random generator. Does not occur for float data types

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
generator = tf.random.get_global_generator()
generator.uniform(shape=(), minval=0, maxval=3, dtype=tf.int32)
```


### Relevant log output

```shell
2023-05-15 11:34:30.621515: I tensorflow/core/common_runtime/executor.cc:1210] [/job:localhost/replica:0/task:0/device:GPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: minval must be 0-D, got shape [2]
         [[{{node StatelessRandomUniformIntV2}}]]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/esten/miniconda3/envs/ml/lib/python3.10/site-packages/tensorflow/python/ops/stateful_random_ops.py", line 788, in uniform
    return gen_stateless_random_ops_v2.stateless_random_uniform_int_v2(
  File "/Users/esten/miniconda3/envs/ml/lib/python3.10/site-packages/tensorflow/python/ops/gen_stateless_random_ops_v2.py", line 477, in stateless_random_uniform_int_v2
    _ops.raise_from_not_ok_status(e, name)
  File "/Users/esten/miniconda3/envs/ml/lib/python3.10/site-packages/tensorflow/python/framework/ops.py", line 6577, in raise_from_not_ok_status
    raise core._status_to_exception(e) from None  # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__StatelessRandomUniformIntV2_device_/job:localhost/replica:0/task:0/device:GPU:0}} minval must be 0-D, got shape [2]
         [[{{node StatelessRandomUniformIntV2}}]] [Op:StatelessRandomUniformIntV2] name:
```
</details>