Repository navigation
C API Locking prevents custom gradient definition #48767
Copy link
Copy link
Closed
Labels
comp:coreissues related to core part of tensorflowissues related to core part of tensorflowstat:contribution welcomeStatus - Contributions welcomeStatus - Contributions welcometype:bugBugBug
Description
Activity
- addedtype:othersissues not falling in bug, perfromance, support, build and install or featureissues not falling in bug, perfromance, support, build and install or feature
on Apr 27, 2021 - addedcomp:apisHighlevel API related issuesHighlevel API related issuestype:supportSupport issuesSupport issuesand removedtype:othersissues not falling in bug, perfromance, support, build and install or featureissues not falling in bug, perfromance, support, build and install or feature
on Apr 28, 2021 - addedcomp:coreissues related to core part of tensorflowissues related to core part of tensorflowtype:bugBugBugstat:awaiting tensorflowerStatus - Awaiting response from tensorflowerStatus - Awaiting response from tensorflowerand removedcomp:apisHighlevel API related issuesHighlevel API related issuestype:supportSupport issuesSupport issues
on Apr 28, 2021 - addedstat:contribution welcomeStatus - Contributions welcomeStatus - Contributions welcomeand removedstat:awaiting tensorflowerStatus - Awaiting response from tensorflowerStatus - Awaiting response from tensorflower
on May 6, 2021 Thanks for reporting the issue!
Please feel free to send a PR!
I can, but what's the preferred solution? Providing and exposing a
TF_AddGradientsWithPrefixLockedthat doesn't lock, or exposingTF_NewOperationLockedandTF_FinishOperationLocked? (See #48815)Exposing
TF_NewOperationLockedandTF_FinishOperationLockedsgtm.
Metadata
Metadata
Assignees
Labels
comp:coreissues related to core part of tensorflowissues related to core part of tensorflowstat:contribution welcomeStatus - Contributions welcomeStatus - Contributions welcometype:bugBugBug
I am trying to add custom gradient support to the Java bindings (tensorflow/java#292). This is currently being prevented by the fact that
TF_AddGradientsWithPrefixrequires a lock on the graph, but so do any operation creation methods (i.e.TF_NewOperation), so it is impossible to create ops in gradient functions.Is there a way I can get around this? I am considering calling
TF_NewOperationLockeddirectly but I assume the locks are there for a reason.