New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PluggableDevice] Add TF_OpKernelConstruction_GetNodeDef
#52157
[PluggableDevice] Add TF_OpKernelConstruction_GetNodeDef
#52157
Conversation
@jpienaar Can you please review this PR ? Thanks! |
We already have taken some steps to get rid of most iteration over attributes towards enabling the backing to not be NodeDef. Additionally exposing the NodeDef results in exposing unregistered attributes which are in the UB part of the world. But I don't know what the policy is PluggableDevice side. |
@jpienaar I can certainly change this PR provide ways to iterate through attributes instead of exposing the NodeDef itself. The ultimate goal here is to be able to cache kernels that have identical attributes to avoid creating kernels that have a long initialization cost multiple times. Can you point me towards the steps taken so far to decouple attributes from the NodeDef? |
@jpienaar Can you please assist on above comments from @PatriceVignola. Thanks! |
@jpienaar Can you please assist on above comments from @PatriceVignola. Thanks! |
TF_OpKernelConstruction_GetNodeDef
@PatriceVignola Can you please resolve conflicts? Thank you! |
@gbaned Done! |
@PatriceVignola Can you please resolve conflicts? Thank you! |
@gbaned Done! |
Although the API has functions like
TF_OpKernelConstruction_GetAttrInt32
, it lacks an abstract to iterate through all the attributes and get their names as well as their value. Since some device backends have relatively slow kernel creation times, being able to access theNodeDef
allows them to uniquely identify kernels for caching purposes.