pytorch
1df2d6a9 - [metal] Fix error reporting on failure to flush command buffer (#76263)

Commit
2 years ago
[metal] Fix error reporting on failure to flush command buffer (#76263) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/76263 Because the check is written `TORCH_CHECK(error)` instead of `TORCH_CHECK(false, error)` the check passes (since error will evaluate to true) and the real error message is lost. This causes a `TORCH_CHECK` failure down the line that is impossible to diagnose. Test Plan: Test in pytorch playground: ``` arc focus2 -b igios-no-extensions -a //fbobjc/Apps/Instagram/AppLibraries/Core/QPL/IGPerformanceLogging:IGPerformanceLogging -a //xplat/caffe2/c10:c10Apple -a //xplat/caffe2:torch_mobile_coreApple -a //xplat/caffe2/fb/dynamic_pytorch:dynamic_pytorch_implApple -a //xplat/caffe2:coreml_delegateApple -a //xplat/caffe2:torch_mobile_all_opsApple -a //xplat/perflogger:perfloggerApple -a coreml_memory_observerApple -c pt.enable_qpl=1 --force-with-wrong-xcode ``` Reviewed By: kimishpatel, dhruvbird Differential Revision: D35858173 fbshipit-source-id: 2f8e992abdc1f64435e198fac01b4d0ea0d45c93 (cherry picked from commit 6c8adcf13f176f8af1764be2603b824198dc3cfe)
Author
Committer
Parents
Loading