Skip to content

[jit] Convert 2 nn.functional functions to weak script#12723

Closed
driazati wants to merge 6 commits intopytorch:masterfrom
driazati:func_conv1
Closed

[jit] Convert 2 nn.functional functions to weak script#12723
driazati wants to merge 6 commits intopytorch:masterfrom
driazati:func_conv1

Conversation

@driazati
Copy link
Copy Markdown
Contributor

@driazati driazati commented Oct 16, 2018

  • Moves weak_script annotation to torch/_jit_internal.py folder to resolve dependency issue between torch.jit and torch.nn
  • Add @torch._jit.weak_script to tanhshrink and softsign, their tests now pass instead of giving an unknown builtin op error
  • Blacklist converted torch.nn.functional functions from appearing in the builtin op list if they don't actually have corresponding aten ops

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

driazati has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

driazati has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ezyang ezyang added the merged label Jun 25, 2019
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
* Moves `weak_script` annotation to `torch/_jit_internal.py` folder to resolve dependency issue between `torch.jit` and `torch.nn`
* Add `torch._jit.weak_script` to `tanhshrink` and `softsign`, their tests now pass instead of giving an `unknown builtin op` error
* Blacklist converted `torch.nn.functional` functions from appearing in the builtin op list if they don't actually have corresponding `aten` ops
Pull Request resolved: pytorch#12723

Differential Revision: D10452986

Pulled By: driazati

fbshipit-source-id: c7842bc2d3ba0aaf7ca6e1e228523dbed3d63c36
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.

4 participants