icemelon9 commented on a change in pull request #4644: [WIP] Relay op strategy
URL: https://github.com/apache/incubator-tvm/pull/4644#discussion_r376057778
##########
File path: include/tvm/relay/op_attr_types.h
##########
@@ -207,14 +216,182 @@ enum AnyCodegenStrategy {
kVariableDimensions
};
-/* \brief A runtime representation of shape. */
+/*! \brief A runtime representation of shape. */
using Shape = Array<IndexExpr>;
using FShapeFunc = runtime::TypedPackedFunc<
Array<te::Tensor>(const Attrs& attrs,
const Array<te::Tensor>& inputs,
const Array<IndexExpr>& out_ndims)>;
+/*!
+ * \brief Operator implementation in TVM.
+ */
+class OpImplementNode : public Object {
+ public:
+ /*! \brief Compute function */
+ FTVMCompute fcompute;
+ /*! \brief Schedule function */
+ FTVMSchedule fschedule;
+ /*! \brief Priority level */
+ Integer plevel;
+
+ void VisitAttrs(tvm::AttrVisitor* v) {
+ v->Visit("plevel", &plevel);
+ }
+
+ static constexpr const char* _type_key = "relay.OpImplement";
+ TVM_DECLARE_FINAL_OBJECT_INFO(OpImplementNode, Object);
+};
+
+/*!
+ * \brief Operator implementation class.
+ */
+class OpImplement : public ObjectRef {
+ public:
+ /*! \brief default constructor */
+ OpImplement() {}
+ /*! \brief constructor from node pointer */
+ explicit OpImplement(ObjectPtr<Object> n) : ObjectRef(n) {}
+ /*!
+ * \brief access the internal node container
+ * \return the pointer to the internal node container
+ */
+ inline const OpImplementNode* operator->() const;
Review comment:
updated
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services