Skip to content

Conversation

@z-a-f
Copy link

@z-a-f z-a-f commented Aug 19, 2020

Stack from ghstack:

Differential Revision: D23231947

@dr-ci
Copy link

dr-ci bot commented Aug 19, 2020

💊 CI failures summary and remediations

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


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)

ci.pytorch.org: 1 failed


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 25 times.

Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

ehhh what's the main goal of this PR (perf?) could you please add a bit context?

@z-a-f
Copy link
Author

z-a-f commented Aug 21, 2020

ehhh what's the main goal of this PR (perf?) could you please add a bit context?

It's introducing the fill_ for quantized tensors, which is needed for different ops (specifically for the ConstantPad)

@z-a-f z-a-f requested a review from ailzhang August 21, 2020 04:34
@z-a-f z-a-f requested a review from jerryzh168 August 24, 2020 23:09
@z-a-f z-a-f requested a review from raghuramank100 August 26, 2020 20:11
Tensor& fill_out(Tensor& self, Scalar value) {
if (self.is_quantized()) {
at::Tensor out = at::ones(self.sizes()).to(kFloat) * value;
out = out.to(self.device());
Copy link
Contributor

Choose a reason for hiding this comment

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

is this needed? Can we assert that out.device() == self.device() instead?

Copy link
Author

Choose a reason for hiding this comment

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

We cannot assert it as the out created in this block. If we don't assign the device, we will have to trust the copy_ to move the tensors across the devices, which is an antipattern :/

@z-a-f z-a-f requested a review from vkuzo August 28, 2020 18:20
@codecov
Copy link

codecov bot commented Aug 28, 2020

Codecov Report

Merging #43303 into gh/z-a-f/53/base will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@                Coverage Diff                @@
##           gh/z-a-f/53/base   #43303   +/-   ##
=================================================
  Coverage             69.24%   69.24%           
=================================================
  Files                   381      381           
  Lines                 47573    47573           
=================================================
  Hits                  32943    32943           
  Misses                14630    14630           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cce5982...f48d10b. Read the comment docs.

@facebook-github-bot
Copy link
Contributor

@z-a-f merged this pull request in 1d01fcd.

@facebook-github-bot facebook-github-bot deleted the gh/z-a-f/53/head branch September 12, 2020 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants