reid from https://github.com/michuanhaohao/reid-strong-baseline
zhangmeng
2020-01-17 f7c4a3cfd07adede3308f8d9d3d7315427d90a7c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
 
#include <c10/macros/Export.h>
 
namespace c10 {
struct OperatorName;
}
 
namespace at {
 
/*
There's semantically three sets of operators:
 
- aten_ops_already_moved_to_c10
- aten_ops_not_moved_to_c10_yet
- non_aten_ops (e.g. custom ops)
 
register_c10_ops.cpp needs to decide between aten_ops_already_moved_to_c10
and union(aten_ops_not_moved_to_c10_yet, non_aten_ops).
The c10 operator registry needs to decide between aten_ops_not_moved_to_c10_yet
and union(aten_ops_already_moved_to_c10, non_aten_ops), which is different to what
register_c10_ops.cpp needs. We need to store two sets to be able to make both decisions.
*/
 
// list of ATen ops that got already moved to the c10 dispatcher
CAFFE2_API bool aten_op_is_already_moved_to_c10(const c10::OperatorName& opName);
 
// list of ATen ops that are still on the globalATenDispatch dispatcher.
CAFFE2_API bool aten_op_is_not_moved_to_c10_yet(const c10::OperatorName& opName);
 
}