[ez] log why fail to gen golden ref (#170843)

Sometimes when doing accuracy test with a large batch size, it fail due to the golden ref can not be generated. It would be helpful to log why we fail to generate the golden ref. In my case, it's due to OOM.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/170843
Approved by: https://github.com/malfet, https://github.com/Skylion007
This commit is contained in:
shunting314
2025-12-18 18:06:58 -08:00
committed by PyTorch MergeBot
parent 94644f2810
commit 96b3e7d789

View File

@@ -2216,6 +2216,7 @@ class BenchmarkRunner:
log.warning(
"fp64 golden ref were not generated for %s. Setting accuracy check to cosine",
name,
exc_info=True,
)
self.args.cosine = True
fp64_outputs = None