Skip to content

Conversation

@icemelon
Copy link
Member

I understand that we have x.astype(dtype) to cast type. But I think it's good to also have relay.cast as another API for cast operator. Besides adding cast op, this PR also includes

  • Add additional safety check for String2TVMType
  • Complete relay op docs

@icemelon icemelon requested a review from yzhliu December 21, 2018 22:19
@jroesch
Copy link
Member

jroesch commented Dec 22, 2018

Looks good to me, should we change the internal name from _make.dtype_cast to cast since it is exposed in both places?

Copy link
Member

@yzhliu yzhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you act on @jroesch 's comment? I have no preference between these two though.

@icemelon
Copy link
Member Author

@jroesch Yes, I think so. Renamed it in the new commit.

@icemelon icemelon merged commit 0e8d8fd into apache:master Dec 26, 2018
FrozenGene pushed a commit to FrozenGene/tvm that referenced this pull request Dec 27, 2018
* Add cast op
* Rename dtype_cast to cast
* Add additional safety check for String2TVMType
* Add missing relay op docs
@icemelon icemelon deleted the cast branch January 4, 2019 18:54
wweic pushed a commit to neo-ai/tvm that referenced this pull request Feb 20, 2019
* Add cast op
* Rename dtype_cast to cast
* Add additional safety check for String2TVMType
* Add missing relay op docs
wweic pushed a commit to neo-ai/tvm that referenced this pull request Feb 20, 2019
* Add cast op
* Rename dtype_cast to cast
* Add additional safety check for String2TVMType
* Add missing relay op docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants