Skip to content

Conversation

@eellison
Copy link
Contributor

@eellison eellison commented Apr 1, 2022

Stack from ghstack:

Add support for parsing Tensor constants like Double(4, 4) ... by initializing random tensors. This makes saving IR and then parsing it lossy, so I have it toggled as default not on, but is useful in cases like repro-ing Fusions with tensor constants post-freezing.

cc @Krovatkin

Differential Revision: D35373999

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

facebook-github-bot commented Apr 1, 2022

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 409350d (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).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Apr 1, 2022
eellison pushed a commit that referenced this pull request Apr 1, 2022
ghstack-source-id: bdab095
Pull Request resolved: #75119
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.

This is supernice, thanks! A couple of remarks below:

std::unordered_map<std::string, Value*>& vmap;
SchemaTypeParser type_parser;
bool parse_tensor_constants_;
std::unordered_set<Node*> deferred_tensor_value_initializations_;

Choose a reason for hiding this comment

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

Using unordered_set here would result in non-determinism. Would it be possible to somehow fix it? We might also want to have some control knob over the random values we use for initialization for the same reason.

Add support for parsing Tensor constants like Double(4, 4) ... by initializing random tensors. This makes saving IR and then parsing it lossy, so I have it toggled as default not on, but is useful in cases like repro-ing Fusions with tensor constants post-freezing.

cc @Krovatkin 

[ghstack-poisoned]
@eellison
Copy link
Contributor Author

eellison commented Apr 4, 2022

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

Add support for parsing Tensor constants like Double(4, 4) ... by initializing random tensors. This makes saving IR and then parsing it lossy, so I have it toggled as default not on, but is useful in cases like repro-ing Fusions with tensor constants post-freezing.

cc @Krovatkin

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

[ghstack-poisoned]
@eellison
Copy link
Contributor Author

eellison commented Apr 5, 2022

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

facebook-github-bot pushed a commit that referenced this pull request Apr 6, 2022
Summary:
Pull Request resolved: #75119

Add support for parsing Tensor constants like Double(4, 4) ... by initializing random tensors. This makes saving IR and then parsing it lossy, so I have it toggled as default not on, but is useful in cases like repro-ing Fusions with tensor constants post-freezing.

cc Krovatkin

Test Plan: Imported from OSS

Reviewed By: ejguan

Differential Revision: D35373999

Pulled By: eellison

fbshipit-source-id: a5c8d9f93f23a7442258fc745ed6b6def330dca8
@facebook-github-bot facebook-github-bot deleted the gh/eellison/290/head branch April 10, 2022 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed 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