Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion torch_xla/csrc/dtype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ bool IsTpuDevice(XlaDeviceType hw_type) {
(hw_type == XlaDeviceType::SPMD) &&
// HACK: find a better way to decide if SPMD is actually a TPU without
// accessing the runtime.
runtime::sys_util::GetEnvString("PJRT_DEVICE", "") == "TPU";
runtime::sys_util::GetEnvString("PJRT_DEVICE", "").find("TPU") !=
std::string::npos;
return (hw_type == XlaDeviceType::TPU) || spmd_device_is_tpu;
}

Expand Down