Skip to content

Commit c2d8a3d

Browse files
zzf/ disable fallback op info display (#748)
* disable fallback op info display * Update RegisterDIPU.hpp
1 parent df93c05 commit c2d8a3d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

dipu/torch_dipu/csrc_dipu/aten/RegisterDIPU.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ void dipu_fallback(const c10::OperatorHandle& op, DispatchKeySet dispatch_keys,
3434
// NOLINTEND(bugprone-macro-parentheses)
3535

3636
// Check the environment variable and call the DIPU_LOG_WARNING_ONCE
37-
#define DIPU_OP_LOG_WARNING_ONCE(...) \
38-
do { \
39-
const char* env = std::getenv("DIPU_DUMP_OP_ARGS"); \
40-
int env_value = (env != nullptr) ? std::atoi(env) : 0; \
41-
if (env_value >= 0) { \
42-
DIPU_LOG_WARNING_ONCE(__VA_ARGS__); \
43-
} \
37+
#define DIPU_OP_LOG_WARNING_ONCE(...) \
38+
do { \
39+
const char* env = std::getenv("DIPU_DUMP_OP_ARGS"); \
40+
int env_value = (env != nullptr) ? std::atoi(env) : -1; \
41+
if (env_value >= 0) { \
42+
DIPU_LOG_WARNING_ONCE(__VA_ARGS__); \
43+
} \
4444
} while (0)
4545

4646
// Temporarily not implement 'sub-dispatch from box' (from torch box func ->

0 commit comments

Comments
 (0)