Skip to content

Commit

Permalink
zzf/ disable fallback op info display (#748)
Browse files Browse the repository at this point in the history
* disable fallback op info display

* Update RegisterDIPU.hpp
  • Loading branch information
zhangzefeng92 authored Mar 26, 2024
1 parent df93c05 commit c2d8a3d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions dipu/torch_dipu/csrc_dipu/aten/RegisterDIPU.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ void dipu_fallback(const c10::OperatorHandle& op, DispatchKeySet dispatch_keys,
// NOLINTEND(bugprone-macro-parentheses)

// Check the environment variable and call the DIPU_LOG_WARNING_ONCE
#define DIPU_OP_LOG_WARNING_ONCE(...) \
do { \
const char* env = std::getenv("DIPU_DUMP_OP_ARGS"); \
int env_value = (env != nullptr) ? std::atoi(env) : 0; \
if (env_value >= 0) { \
DIPU_LOG_WARNING_ONCE(__VA_ARGS__); \
} \
#define DIPU_OP_LOG_WARNING_ONCE(...) \
do { \
const char* env = std::getenv("DIPU_DUMP_OP_ARGS"); \
int env_value = (env != nullptr) ? std::atoi(env) : -1; \
if (env_value >= 0) { \
DIPU_LOG_WARNING_ONCE(__VA_ARGS__); \
} \
} while (0)

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

0 comments on commit c2d8a3d

Please sign in to comment.