srkreddy1238 commented on code in PR #18523:
URL: https://github.com/apache/tvm/pull/18523#discussion_r2572778045


##########
include/tvm/runtime/tensor.h:
##########
@@ -188,14 +189,25 @@ class Tensor : public tvm::ffi::Tensor {
    */
   TVM_DLL static void CopyFromBytes(const DLTensor* to, void* from, size_t 
nbytes,
                                     TVMStreamHandle stream = nullptr);
+
+  TVM_DLL void SetScope(ffi::String scope);
+  TVM_DLL ffi::String GetScope() const;
+
+ protected:
+  /*!
+   * \brief The memory scope
+   * represents the underlaying scope information of device
+   */
+  ffi::String scope = "global";

Review Comment:
   This is primarily for the consts / params load/store. The scope information 
should go at the time of loading consts (runtime::Tensor) to avoid copies.
   
   I think, it can be achieved by altering Load/Store ConstSection of 
Executable. Let me try this way...



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to