[TensorExpr] Don't rely on exceptions in Vectorizer. (#64609)
authorMikhail Zolotukhin <mvz@fb.com>
Wed, 8 Sep 2021 07:22:05 +0000 (00:22 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 8 Sep 2021 07:25:34 +0000 (00:25 -0700)
commit72274e2a2fd55019ec860e1743dbdc5b0c5a5624
tree64ec0ce37edfec33e1a7c9f074517c07161dc4b3
parent2341ec9ef10d7e168cc239396ebb6f3e74a5620d
[TensorExpr] Don't rely on exceptions in Vectorizer. (#64609)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/64609

We've been using exceptions to indicate whether vectorization succeeded
or not, but that posed some problems with (e.g. we spent too much time
symbolicazing these exceptions). This change converts this mechanism to
a standard error return code.

Test Plan: Imported from OSS

Reviewed By: bertmaher

Differential Revision: D30795342

Pulled By: ZolotukhinM

fbshipit-source-id: 16e38b37bcdd78ceb438ac814cc377f35b058e17
test/cpp/tensorexpr/test_kernel.cpp
torch/csrc/jit/tensorexpr/loopnest.cpp