Hello,
I wanted to implement a profiling component like PAPI, but for the power measurement infrastructure of a cluster:
I mostly followed the approach that was used by the PAPI component:
A CMake module has been added. The header and source are stored in the runtime contrib folder. The Python class was added to the init.py and I am using TVM_REGISTER_GLOBAL, TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS and TVM_DECLARE_FINAL_OBJECT_INFO just like in papi.cc.
However, when I try to compile it, I get the error:
error: ‘tvm::runtime::profiling::HDEEMMetricCollector::HDEEMMetricCollector()’ cannot be overloaded with ‘tvm::runtime::profiling::HDEEMMetricCollector::HDEEMMetricCollector()’
I am not really sure how the FFI works internally, but it seems to be related to it, as the error occurs in:
class HDEEMMetricCollector : public MetricCollector {
public:
explicit HDEEMMetricCollector() {
data_ = make_object<HDEEMMetricCollectorNode>();
}
TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS(HDEEMMetricCollector, MetricCollector,
HDEEMMetricCollectorNode);
};