transformers
55c3cc9f - [tests] Some fixes for test suite failures on TPU (#49425)

Commit
18 days ago
[tests] Some fixes for test suite failures on TPU (#49425) * test: use the CUDA SDPA tolerances on TPU Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: request full-precision float32 matmuls in the test suite enable_tf32(False) only sets the new fp32_precision API. torch_tpu follows the legacy float32_matmul_precision, which it sets to "medium". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: run subprocess tests in-process on single-process devices TPU locks the device to the process that opens it, so the pytest process holds it and the subprocess can never open it. Device spec files can add their device with SINGLE_PROCESS_DEVICE = True. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: restore the default device when the global device test fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: add TPU expectations to the gemma3 integration tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: add TPU expectations to the gemma3n integration tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: add TPU expectations to the gpt2 integration tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiAi1LaVWKhaLmJs7s7KQ7 * test: add TPU expectations to the qwen2 integration tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiAi1LaVWKhaLmJs7s7KQ7 * test: add TPU expectations to the llama integration tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiAi1LaVWKhaLmJs7s7KQ7 * test: add TPU expectations to the internvl integration tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiAi1LaVWKhaLmJs7s7KQ7 * test: add TPU expectations to the mistral3 integration tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiAi1LaVWKhaLmJs7s7KQ7 * test: add TPU expectations to the whisper integration tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiAi1LaVWKhaLmJs7s7KQ7 * review(test): relax whisper expectations on TPU We just used two digites, and the list matched ROCm, so we only keep this one. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Author
Parents
Loading