Fix misuages for TORCH_CHECK/TORCH_INTERNAL_ASSERT with string (#26897)

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

TORCH_INTERNAL_ASSERT("foo") doesn't do what you think it does :)

I'll try to do a fix to catch it in the compiler, but for now - let's fix usages

Found them using regex:
```
ag --cpp "TORCH_(CHECK|INTERNAL_ASSERT)\([ \n]*\"" --multiline
```

Test Plan: Imported from OSS

Differential Revision: D17624299

Pulled By: dzhulgakov

fbshipit-source-id: 74f05737ef598fd92b5e61541ee36de2405df23d
This commit is contained in:
Dmytro Dzhulgakov
2019-09-27 13:43:12 -07:00
committed by Facebook Github Bot
parent 764bf826e3
commit 0ae0c9788e
11 changed files with 17 additions and 19 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ namespace jit {
#if defined(_WIN32)
void runJITCPPTests(bool runCuda) {
TORCH_INTERNAL_ASSERT("JIT tests not yet supported on Windows");
TORCH_INTERNAL_ASSERT(false, "JIT tests not yet supported on Windows");
}
#else
#define JIT_TEST(name) test##name();