You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "tqchen (via GitHub)" <gi...@apache.org> on 2023/01/30 14:07:05 UTC

[GitHub] [tvm] tqchen commented on a diff in pull request #13868: [OpenCL] Implement save/load pre-compiled programs

tqchen commented on code in PR #13868:
URL: https://github.com/apache/tvm/pull/13868#discussion_r1090670535


##########
include/tvm/runtime/module.h:
##########
@@ -192,6 +192,27 @@ class TVM_DLL ModuleNode : public Object {
   /*! \return The module it imports from */
   const std::vector<Module>& imports() const { return imports_; }
 
+  /*!
+   * \brief Returns true if this module supports building from pre-compiled programs.
+   *
+   * The default implementation returns false.
+   */
+  virtual bool SupportPreCompiledPrograms() const { return false; }
+
+  /*!
+   * \brief Pass pre-compiled programs which module will use to speed up compilation time.
+   * \param bytes string with bytes of pre-compiled programs.
+   */

Review Comment:
   Would be great to not touch the general module interface. Instead, support pre-compiled binary directly in OpenCLModule serialization. So the main goal is to enable such serializable as part of opencl binary.
   
   We can have a separate load_binary key suffix to enable backward compatibility.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org