Skip to content

Conversation

@chenwhql
Copy link
Contributor

@chenwhql chenwhql commented Feb 22, 2021

PR types

New features

PR changes

Others

Describe

[CustomOp] Support attributes as func input in custom op

Supported attr types include:

  • bool
  • int
  • float
  • int64_t
  • std::string
  • std::vector<int>
  • std::vector<float>
  • std::vector<int64_t>
  • std::vector<std::string>

The backward func's attributes MUST be the subset of forward func's attributes.

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

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

LGTM

@chenwhql chenwhql merged commit e8cdb49 into PaddlePaddle:develop Feb 25, 2021
chenwhql added a commit to chenwhql/Paddle that referenced this pull request Feb 26, 2021
…e#31128)

* add simple attr support and test

* add int, float attr support

* support other attribute

* add custom attrs test in cmake

* polish details

* fix test failed

* add backward test

* update test flags
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.

3 participants