Skip to content

Conversation

mcr229
Copy link
Contributor

@mcr229 mcr229 commented Aug 25, 2023

Summary:
In XNNPACK from the partitioner we encounter quantize node that are outputs to the graph. Since these quantize nodes are implicit and not actually quantizing the values, we must give its externalness to the node with which it quantizes.

Outputs

                 |
conv --> q ----> | ----> dq -->
                 |
         Delegate boundary

In this example the output of the delegate is the output of quantized Conv. In XNNPACK, we must designate the output of Conv to be an external value. In this graph, however, the q node is the output. Since q is an implicit node (it does not actually running quantize) We pass its externalness to the conv node.

Inputs

i.e.

        |
q ----> | ----> dq --> conv -->
        |
Delegate boundary

In this example q is the placeholder node and is given as input to the first dq. But we are running a quantized conv within the delegate. Since dq is implicit, we pass the externalness of the q place holder to dq, so that the input to Conv is external.

Reviewed By: digantdesai

Differential Revision: D48667676

jerryzh168 and others added 3 commits August 25, 2023 10:16
Summary:
X-link: pytorch/pytorch#107930

att

bypass-github-export-checks

Reviewed By: kimishpatel

Differential Revision: D48588121

fbshipit-source-id: a6dd25bfd70d2f54202b497fa68cac2ef8b9626a
Differential Revision: D48667679

fbshipit-source-id: c1365045f9a93609d7a07e5229a2799af05a3f47
Summary:
In XNNPACK from the partitioner we encounter quantize node that are outputs to the graph. Since these quantize nodes are implicit and not actually quantizing the values, we must give its externalness to the node with which it quantizes.

### Outputs
```
                 |
conv --> q ----> | ----> dq -->
                 |
         Delegate boundary
```
In this example the output of the delegate is the output of quantized Conv. In XNNPACK, we must designate the output of Conv to be an external value. In this graph, however, the q node is the output. Since q is an implicit node (it does not actually running quantize) We pass its externalness to the conv node.

### Inputs
i.e.
```
        |
q ----> | ----> dq --> conv -->
        |
Delegate boundary
```
In this example q is the placeholder node and is given as input to the first dq. But we are running a quantized conv within the delegate. Since dq is implicit, we pass the externalness of the q place holder to dq, so that the input to Conv is external.

Reviewed By: digantdesai

Differential Revision: D48667676

fbshipit-source-id: a6adfdd917a0efd4de56549652900ea614cb9661
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 25, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48667676

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 76b1385.

Gasoonjia pushed a commit that referenced this pull request Jul 30, 2024
* --chat

* update

* cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants