cannot find explicitly assigned device for op
@xiedeacc 
Will it be possible for you to upgrade the TF version to the latest?
Could you please have a look at the below configurations and let us know if it helps?

Version | Python version | Compiler | Build tools
-- | -- | -- | --
tensorflow-2.13.0 | 3.8-3.11 | Clang 16.0.0 | Bazel 5.3.0
 
Please follow [this](https://www.tensorflow.org/install/source) document for more information on this. 
Thank you! fix by config.set_allow_soft_placement(true) 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/61360">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/61360">No</a>
 @xiedeacc Glad it worked fine for you. Thank you!
### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

tf 2.8.4

### Custom code

No

### OS platform and distribution

ubuntu18.04

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

5.2.0

### GCC/compiler version

gcc-11.3.0

### CUDA/cuDNN version

none

### GPU model and memory

none

### Current behavior?

model trained use GPU, but infer machine don't have GPU device, so will meet cannot find assigend device at model load stage. here is log
```
E20230724 13:02:27.982717 35915 tf_model_core.cc:80] Failed to load model in /data/mfs6/new_wifi_models/tf_ranking_model/cvr_model/cvr_dynamic_embedding/2023-07-11.23/, Cannot assign a device for operation lr_weight-parameter_mht_1of1_lookup_table_export_values/TFRA>CuckooHashTableExport: {{node lr_weight-parameter_mht_1of1_lookup_table_export_values/TFRA>CuckooHashTableExport}} was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device. The requested device appears to be a GPU, but CUDA is not enabled.


```

### Standalone code to reproduce the issue

```shell
no code
```


### Relevant log output

_No response_