[jit] Add hash() global#18258
Conversation
| _(aten, _set_item) \ | ||
| _(aten, index_put_) \ | ||
| _(aten, device) \ | ||
| _(aten, hash) \ |
There was a problem hiding this comment.
We haven't always been following this, but I think it would be a nice rule of thumb that reserved keywords go under the prim namespace
facebook-github-bot
left a comment
There was a problem hiding this comment.
@driazati has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@driazati has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@pytorchbot rebase this please |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@driazati has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@pytorchbot rebase this please |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@driazati has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: This adds `hash()` which supports `int`, `str`, and `float`. It relies on `std::hash` which is implementation defined, so the result of `hash()` in TorchScript is not the same as in Python, but should satisfy the same properties. Pull Request resolved: pytorch/pytorch#18258 Differential Revision: D14692317 Pulled By: driazati fbshipit-source-id: 909df5d024bb3feea157d5a203b7de53c72261c9
Summary: This adds `hash()` which supports `int`, `str`, and `float`. It relies on `std::hash` which is implementation defined, so the result of `hash()` in TorchScript is not the same as in Python, but should satisfy the same properties. Pull Request resolved: pytorch#18258 Differential Revision: D14692317 Pulled By: driazati fbshipit-source-id: 909df5d024bb3feea157d5a203b7de53c72261c9
This adds
hash()which supportsint,str, andfloat. It relies onstd::hashwhich is implementation defined, so the result ofhash()in TorchScript is not the same as in Python, but should satisfy the same properties.