Skip to content

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Jun 19, 2020

Stack from ghstack:

Summary:

Adds graph mode handling for inplace hardswish, and test coverage for functional hardswish.

Test Plan:

python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D22140628

Summary:

WIP

Test Plan:

```
python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish
```

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@vkuzo vkuzo requested a review from apaszke as a code owner June 19, 2020 16:45
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jun 19, 2020
@vkuzo vkuzo changed the title graph more: add hardswish inplace handling graph mode: add hardswish inplace handling Jun 19, 2020
@dr-ci
Copy link

dr-ci bot commented Jun 19, 2020

💊 CI failures summary and remediations

As of commit 0f5fed7 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 30 times.

Summary:

WIP

need to fix inplace before landing.  graph comparison: https://www.internalfb.com/intern/paste/P133715227/

Test Plan:

```
python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish
```

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jun 19, 2020
Summary:

WIP

Test Plan:

```
python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 77c289f
Pull Request resolved: #40284
@vkuzo vkuzo requested a review from jerryzh168 June 19, 2020 18:07
else:
# module under test can contain in-place ops, and we depend on
# input data staying constant for comparisons
data_copy = copy.deepcopy(data)
Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense, wonder why we didn't discover this in other tests

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, maybe this is the first one modifying input data

Comment on lines 2096 to 2097
for tracing in [True, False]:
m = self.checkGraphModeOp(hardswish, data, "quantized::hardswish", tracing)
FileCheck().check_not("aten::hardswish") \
.run(m.graph)
for m in modules:
Copy link
Contributor

@jerryzh168 jerryzh168 Jun 19, 2020

Choose a reason for hiding this comment

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

nit: you can use itertools to reduce identation, see other test cases in the file

Copy link
Contributor

@jerryzh168 jerryzh168 left a comment

Choose a reason for hiding this comment

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

LG

Summary:

Adds graph mode handling for inplace hardswish, and test coverage for functional hardswish.

Test Plan:

```
python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish
```

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D22140628](https://our.internmc.facebook.com/intern/diff/D22140628)

[ghstack-poisoned]
Summary:

Adds graph mode handling for inplace hardswish, and test coverage for functional hardswish.

Test Plan:

```
python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish
```

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D22140628](https://our.internmc.facebook.com/intern/diff/D22140628)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jun 20, 2020
Summary:

WIP

Test Plan:

```
python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 48c5d91
Pull Request resolved: #40284
Summary:

Adds graph mode handling for inplace hardswish, and test coverage for functional hardswish.

Test Plan:

```
python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish
```

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D22140628](https://our.internmc.facebook.com/intern/diff/D22140628)

[ghstack-poisoned]
Summary:

Adds graph mode handling for inplace hardswish, and test coverage for functional hardswish.

Test Plan:

```
python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish
```

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D22140628](https://our.internmc.facebook.com/intern/diff/D22140628)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jun 20, 2020
Summary:

WIP

Test Plan:

```
python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 1a9e7ca
Pull Request resolved: #40284
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in ab8a99b.

@facebook-github-bot facebook-github-bot deleted the gh/vkuzo/95/head branch June 25, 2020 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants