mirror of
https://github.com/zebrajr/pytorch.git
synced 2026-01-15 12:15:51 +00:00
Add full namespace resolution in CAFFE_DURATION (#12065)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/12065 Had compilation issues using CAFFE_DURATION in some contexts, specifically due to namespace resolution. Since this is a macro, it should fully qualify. Reviewed By: heslami Differential Revision: D10036132 fbshipit-source-id: b8d55dfe5e991ca702ce5b7483f0ffc699882c85
This commit is contained in:
committed by
Facebook Github Bot
parent
d9c27f4d8d
commit
6ff568df4d
@@ -350,8 +350,8 @@ _ScopeGuard<T> ScopeGuard(T f) {
|
||||
##__VA_ARGS__); \
|
||||
}
|
||||
|
||||
#define CAFFE_DURATION(stats, field, ...) \
|
||||
if (auto g = detail::ScopeGuard([&](int64_t nanos) { \
|
||||
CAFFE_EVENT(stats, field, nanos, ##__VA_ARGS__); \
|
||||
#define CAFFE_DURATION(stats, field, ...) \
|
||||
if (auto g = ::caffe2::detail::ScopeGuard([&](int64_t nanos) { \
|
||||
CAFFE_EVENT(stats, field, nanos, ##__VA_ARGS__); \
|
||||
}))
|
||||
} // namespace caffe2
|
||||
|
||||
Reference in New Issue
Block a user