Skip to content

Prevent replacing DALI op by constant in the constant folding process#367

Merged
JanuszL merged 1 commit intoNVIDIA:masterfrom
JanuszL:fix_tf_lables
Dec 14, 2018
Merged

Prevent replacing DALI op by constant in the constant folding process#367
JanuszL merged 1 commit intoNVIDIA:masterfrom
JanuszL:fix_tf_lables

Conversation

@JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Dec 13, 2018

During constant folding process, TensorFlow checks if nodes that have
constant input produces constant outputs and replaces them with constants.
In our case, it can happen as DALI op provides a deterministic output when running once
just after construction. Also, DALI op provides CPU variant so now TensorFlow
can run DALI on CPU for constant folding examination. To prevent this
DALI op needs to tell that it is stateful.

Signed-off-by: Janusz Lisiecki jlisiecki@nvidia.com

During constant folding process, TensorFlow checks if nodes that have
constant input produces constant outputs and replaces them with constants.
In our case, it can happen as DALI op provides a deterministic output when running once
just after construction. Also, DALI op provides CPU variant so now TensorFlow
can run DALI on CPU for constant folding examination. To prevent this
DALI op needs to tell that it is stateful.

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL JanuszL requested review from Kh4L and pribalta December 13, 2018 15:04
@JanuszL
Copy link
Contributor Author

JanuszL commented Dec 13, 2018

Builds 593276

Copy link
Contributor

@pribalta pribalta left a comment

Choose a reason for hiding this comment

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

lgtm

@JanuszL JanuszL merged commit a014669 into NVIDIA:master Dec 14, 2018
@JanuszL JanuszL deleted the fix_tf_lables branch December 14, 2018 09:26
JanuszL added a commit that referenced this pull request Dec 14, 2018
…#367)

During constant folding process, TensorFlow checks if nodes that have
constant input produces constant outputs and replaces them with constants.
In our case, it can happen as DALI op provides a deterministic output when running once
just after construction. Also, DALI op provides CPU variant so now TensorFlow
can run DALI on CPU for constant folding examination. To prevent this
DALI op needs to tell that it is stateful.

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
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