Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Rewrite tracing utilities in terms of LazyTensor. #385

Merged
merged 9 commits into from
Jul 29, 2019

Conversation

bgogul
Copy link
Contributor

@bgogul bgogul commented Jul 24, 2019

This PR reimplements _tffunc and _graph in Runtime.swift using the explicit tracing mechanism in LazyTensor.

@bgogul bgogul requested a review from pschuh July 24, 2019 06:02
@bgogul bgogul changed the title Rewrites the tracing utilities in terms of LazyTensor. Rewrite tracing utilities in terms of LazyTensor. Jul 24, 2019
@@ -934,65 +934,33 @@ public func _tffunc<State: _TensorArrayProtocolEnhanced, Data: TensorGroup>(
}
}

internal func _trace<In: TensorGroup, Out: TensorGroup>(_ fn: (In) -> Out) -> TFFunction {
let useLazyTensor = _RuntimeConfig.useLazyTensor
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems not thread-safe.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah.. you are right. Hold the review on this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be resolved now.

@bgogul bgogul removed the request for review from pschuh July 24, 2019 06:12
@bgogul bgogul changed the title Rewrite tracing utilities in terms of LazyTensor. WIP: Rewrite tracing utilities in terms of LazyTensor. Jul 24, 2019
@bgogul bgogul changed the title WIP: Rewrite tracing utilities in terms of LazyTensor. WIP: Rewrite tracing utilities in terms of LazyTensor. Jul 24, 2019
@bgogul bgogul force-pushed the rewrite_tf_func branch from 1d87344 to 530fa9e Compare July 25, 2019 00:49
@bgogul bgogul changed the title WIP: Rewrite tracing utilities in terms of LazyTensor. Rewrite tracing utilities in terms of LazyTensor. Jul 25, 2019
@bgogul bgogul force-pushed the rewrite_tf_func branch from 5668389 to b6edf9e Compare July 29, 2019 18:37
@bgogul bgogul merged commit 1de468a into tensorflow:master Jul 29, 2019
@bgogul bgogul deleted the rewrite_tf_func branch July 29, 2019 18:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants