Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zzf/ disable fallback op info display #748

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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