PR #12049: Detect when we are running on an NVIDIA simulator and check that we pull the device description from gpu_specs.
PR #12049: Detect when we are running on an NVIDIA simulator and check that we pull the device description from gpu_specs.

Imported from GitHub PR https://github.com/openxla/xla/pull/12049

This helps when testing the compiler on new hardware platforms. The simulator may have nonsensical values for a few fields in the device description (such as device_memory_size == -1), so we want to use a hard-coded device description that contains the correct values.
Copybara import of the project:

--
1a488e45b3a7d0f7729fde9c28915c40188d17b3 by Dimitris Vardoulakis <dvardoulakis@nvidia.com>:

On Nvidia simulation, fail if target config hasn't been supplied using --xla_gpu_target_config_filename.

Merging this change closes #12049

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/12049 from dimvar:detect-nvidia-simulation 1a488e45b3a7d0f7729fde9c28915c40188d17b3
