Skip to content

Add g.insertConstant and clean up dead attributes code#10177

Closed
zdevito wants to merge 3 commits intopytorch:masterfrom
zdevito:pr/emit_with_schema
Closed

Add g.insertConstant and clean up dead attributes code#10177
zdevito wants to merge 3 commits intopytorch:masterfrom
zdevito:pr/emit_with_schema

Conversation

@zdevito
Copy link
Contributor

@zdevito zdevito commented Aug 2, 2018

  • Changes insertConstant(g, val) to g.insertConstant(val).
  • Moves SourceRange to its own file to enable it.
  • Cleans up dead attribute code in schema matching and graph.

zdevito added 2 commits August 2, 2018 12:53
Replaces insertConstant(g, val), and makes it more consistent with other
node construction function.

Moves SourceRange to its own header so that we don't have to include
the entire lexer in ir.h
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

// a range of a shared string 'file_' with functions to help debug by highlight
// that
// range.
struct SourceRange : public SourceLocation {

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

@zdevito
Copy link
Contributor Author

zdevito commented Aug 2, 2018

@pytorchbot retest this please

1 similar comment
@zdevito
Copy link
Contributor Author

zdevito commented Aug 3, 2018

@pytorchbot retest this please


// note: prefer g.insertConsant(val, loc) which does exactly the same thing
// this function is only declared/defined here because its implementation is
// closely related to the implementation of prim::Constant that is also in constants.cpp

This comment was marked as off-topic.

goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
Summary:
* Changes `insertConstant(g, val)` to `g.insertConstant(val)`.
* Moves SourceRange to its own file to enable it.
* Cleans up dead attribute code in schema matching and graph.
Pull Request resolved: pytorch#10177

Differential Revision: D9137789

Pulled By: zdevito

fbshipit-source-id: 8a73cfb01a576f02e7e4dce019be9c0a0002989d
@ezyang ezyang added the merged label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants