Skip to content

Conversation

@jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Sep 18, 2019

Stack from ghstack:

Summary:
Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

Differential Revision: D17504459

Summary:
Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:
Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:
Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:
Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:
Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Copy link

@ZolotukhinM ZolotukhinM left a comment

Choose a reason for hiding this comment

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

Could you please add a test for this change? Ideally, the test should fail before this change and pass after (I also suspect that such test would catch that you're not actually passing the weight set by reference). Otherwise the code looks good!

script::Module& module,
const QConfig& qconfig) {
const QConfig& qconfig,
const std::unordered_set<Value*>& weight_values) {

Choose a reason for hiding this comment

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

Might be worth to refactor all that into a helper class to avoid passing these sets in every function. Later we'll also add a similar set for 'bias' values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK will do refactor in a separate PR

Summary:
Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:
Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Copy link

@ZolotukhinM ZolotukhinM left a comment

Choose a reason for hiding this comment

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

Overall looks good! Please fix a couple of remarks inline before landing.

// the child module.
auto module_instance = v->node()->inputs()[0];
auto module_method_name = v->node()->s(attr::name);
// TODO: looks like this block is not related to v? maybe we should

Choose a reason for hiding this comment

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

The code below uses v-node(). I'm not sure this TODO comment is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mean we don't need v, we just need node

Summary:
Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@jerryzh168
Copy link
Contributor Author

jerryzh168 commented Sep 20, 2019 via email

Summary:
Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
Summary:
Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
Summary:
Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 1bec8d7.

mingbowan pushed a commit to mingbowan/pytorch that referenced this pull request Sep 23, 2019
Summary:
Pull Request resolved: pytorch#26425

Currently the scalar type is hardcoded for weight and normal tensor
but what we want is to get it from corresponding observer module

Test Plan:
there are some known issues right now,
will test e2e later when all the issues are fixed

Imported from OSS

Differential Revision: D17504459

fbshipit-source-id: f5a21789c2ebeb60bff4acc777db80170063c9f8
@facebook-github-bot facebook-github-bot deleted the gh/jerryzh168/76/head branch October 28, 2019 22:15
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.

6 participants