mirror of
https://github.com/pytorch/pytorch.git
synced 2026-11-20 09:04:25 +08:00
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:
committed by
Facebook Github Bot
parent
764bf826e3
commit
0ae0c9788e
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user