You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/03/12 03:15:52 UTC

[GitHub] [incubator-tvm] wweic opened a new issue #5047: [Runtime] Python String container interface

wweic opened a new issue #5047: [Runtime] Python String container interface
URL: https://github.com/apache/incubator-tvm/issues/5047
 
 
   * Provide python interface to use runtime String container.
   * Migrate existing string use cases to the python interface.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] zhiics commented on issue #5047: [Runtime] Python String container interface

Posted by GitBox <gi...@apache.org>.
zhiics commented on issue #5047: [Runtime] Python String container interface
URL: https://github.com/apache/incubator-tvm/issues/5047#issuecomment-601223003
 
 
   @wweic, probably all places we used stringing?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen commented on issue #5047: [Runtime] Python String container interface

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #5047: [Runtime] Python String container interface
URL: https://github.com/apache/incubator-tvm/issues/5047#issuecomment-600857831
 
 
   cc @zhiics @mbaret @comaniac @jroesch we probably needs to migrate the use of StringImm to String once the string container is introduced

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] wweic commented on issue #5047: [Runtime] Python String container interface

Posted by GitBox <gi...@apache.org>.
wweic commented on issue #5047: [Runtime] Python String container interface
URL: https://github.com/apache/incubator-tvm/issues/5047#issuecomment-601055446
 
 
   @tqchen Could you give me pointers to codes where we can use the python string api to pass strings around? I'll use them as example to drive my  implementation.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] zhiics edited a comment on issue #5047: [Runtime] Python String container interface

Posted by GitBox <gi...@apache.org>.
zhiics edited a comment on issue #5047: [Runtime] Python String container interface
URL: https://github.com/apache/incubator-tvm/issues/5047#issuecomment-601223003
 
 
   @wweic, probably all places we used stringimm?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen commented on issue #5047: [Runtime] Python String container interface

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #5047: [Runtime] Python String container interface
URL: https://github.com/apache/incubator-tvm/issues/5047#issuecomment-601287957
 
 
   I can see the following steps:
   
   - Introduce the string container
      - We need to think about how to make the String object works like a normal python string(possibly subclass str?, I haven't dig deep)
      - At this stage users can pass and return String but need to explicitly do so
   - Add automatic conversion from TVMArgValue to String, when the argument is c string pointer and bytes, automatically convert to a String container(via copy).
   - Change the original usage of StringImm to use String instead
   - Change automatic object conversion(tvm.convert) https://github.com/apache/incubator-tvm/blob/master/python/tvm/runtime/object_generic.py#L59 to convert python str to String object

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen edited a comment on issue #5047: [Runtime] Python String container interface

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on issue #5047: [Runtime] Python String container interface
URL: https://github.com/apache/incubator-tvm/issues/5047#issuecomment-601287957
 
 
   I can see the following steps:
   
   - Introduce the string container
      - We need to think about how to make the String object works like a normal python string(possibly subclass str?, I haven't dig deep)
      - At this stage users can pass and return String but need to explicitly do so
   - Add automatic conversion from TVMArgValue to String, when the argument is c string pointer and bytes, automatically convert to a String container(via copy).
   - Change the original usage of StringImm to use String instead
   - Change automatic object conversion(tvm.convert) https://github.com/apache/incubator-tvm/blob/master/python/tvm/runtime/object_generic.py#L59 to convert python str to String object
   - Remove constructor of Expr from std::string(as it will no longer be needed), we will use Array<String> for most cases
   - Add reflection support to serialize a String (so we can dump a String object to json).
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen commented on issue #5047: [Runtime] Python String container interface

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #5047:
URL: https://github.com/apache/incubator-tvm/issues/5047#issuecomment-618772966


   https://github.com/apache/incubator-tvm/pull/5426


----------------------------------------------------------------
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:
users@infra.apache.org