Skip to content

TF-TRT Backward compatibility test - #34660

Merged
tensorflow-copybara merged 11 commits into
tensorflow:masterfrom
pooyadavoodi:tftrt_bwd_compatibility_test
Dec 11, 2019
Merged

tensorflow-copybara merged 11 commits into
tensorflow:masterfrom
pooyadavoodi:tftrt_bwd_compatibility_test

Conversation

@pooyadavoodi

Copy link
Copy Markdown
  • Adds a new test to ensure TF-TRT can execute models saved in previous minor releases of TF2.x.
  • The checked in model is generated using tensorflow-gpu==2.0.0

@pooyadavoodi
pooyadavoodi requested a review from aaroey November 27, 2019 22:55
@tensorflow-bot tensorflow-bot Bot added the size:M CL Change Size: Medium label Nov 27, 2019
@pooyadavoodi pooyadavoodi changed the title TF-TRT Backward compatibility test WIP: TF-TRT Backward compatibility test Nov 27, 2019
@rthadur rthadur self-assigned this Nov 28, 2019
@pooyadavoodi pooyadavoodi changed the title WIP: TF-TRT Backward compatibility test TF-TRT Backward compatibility test Dec 4, 2019
@rthadur
rthadur requested a review from aaroey December 4, 2019 03:07
aaroey
aaroey previously approved these changes Dec 4, 2019
@tensorflow-bot tensorflow-bot Bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Dec 4, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Dec 4, 2019
@rthadur

rthadur commented Dec 4, 2019

Copy link
Copy Markdown
Contributor

@pooyadavoodi can you please check build failures ?

@rthadur rthadur removed the ready to pull PR ready for merge process label Dec 4, 2019
@pooyadavoodi

Copy link
Copy Markdown
Author

I just fixed a few bugs.

Any idea about these errors which seem to be related to Eigen?

WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/bitbucket.org/eigen/eigen/get/54bca9936424.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found 
WARNING: Download from https://bitbucket.org/eigen/eigen/get/54bca9936424.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException Checksum was d8469c8be9ded39e914a7cd3c1246bae36ab0737d9c173328303766a3c7187e2 but wanted 9edd4860b52813eaf8c023f0de1767ec58e2d67a290b718e6702469208ac5be1
ERROR: An error occurred during the fetch of repository 'eigen_archive':
   java.io.IOException: Error downloading [https://storage.googleapis.com/mirror.tensorflow.org/bitbucket.org/eigen/eigen/get/54bca9936424.tar.gz, https://bitbucket.org/eigen/eigen/get/54bca9936424.tar.gz] to /tmpfs/bazel_output/_bazel_kbuilder/f2d52ca1f092ccbe254cc98c3dc90790/external/eigen_archive/54bca9936424.tar.gz: Checksum was d8469c8be9ded39e914a7cd3c1246bae36ab0737d9c173328303766a3c7187e2 but wanted 9edd4860b52813eaf8c023f0de1767ec58e2d67a290b718e6702469208ac5be1
Analyzing: 1471 targets (431 packages loaded, 3071 targets configured)
Analyzing: 1471 targets (440 packages loaded, 3250 targets configured)
ERROR: /tmpfs/src/github/tensorflow/third_party/eigen3/BUILD:33:1: //third_party/eigen3:eigen3 depends on @eigen_archive//:eigen in repository @eigen_archive which failed to fetch. no such package '@eigen_archive//': java.io.IOException: Error downloading [https://storage.googleapis.com/mirror.tensorflow.org/bitbucket.org/eigen/eigen/get/54bca9936424.tar.gz, https://bitbucket.org/eigen/eigen/get/54bca9936424.tar.gz] to /tmpfs/bazel_output/_bazel_kbuilder/f2d52ca1f092ccbe254cc98c3dc90790/external/eigen_archive/54bca9936424.tar.gz: Checksum was d8469c8be9ded39e914a7cd3c1246bae36ab0737d9c173328303766a3c7187e2 but wanted 9edd4860b52813eaf8c023f0de1767ec58e2d67a290b718e6702469208ac5be1

@pooyadavoodi

Copy link
Copy Markdown
Author

I just fixed a few bugs.

Any idea about these errors which seem to be related to Eigen?

WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/bitbucket.org/eigen/eigen/get/54bca9936424.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found 
WARNING: Download from https://bitbucket.org/eigen/eigen/get/54bca9936424.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException Checksum was d8469c8be9ded39e914a7cd3c1246bae36ab0737d9c173328303766a3c7187e2 but wanted 9edd4860b52813eaf8c023f0de1767ec58e2d67a290b718e6702469208ac5be1
ERROR: An error occurred during the fetch of repository 'eigen_archive':
   java.io.IOException: Error downloading [https://storage.googleapis.com/mirror.tensorflow.org/bitbucket.org/eigen/eigen/get/54bca9936424.tar.gz, https://bitbucket.org/eigen/eigen/get/54bca9936424.tar.gz] to /tmpfs/bazel_output/_bazel_kbuilder/f2d52ca1f092ccbe254cc98c3dc90790/external/eigen_archive/54bca9936424.tar.gz: Checksum was d8469c8be9ded39e914a7cd3c1246bae36ab0737d9c173328303766a3c7187e2 but wanted 9edd4860b52813eaf8c023f0de1767ec58e2d67a290b718e6702469208ac5be1
Analyzing: 1471 targets (431 packages loaded, 3071 targets configured)
Analyzing: 1471 targets (440 packages loaded, 3250 targets configured)
ERROR: /tmpfs/src/github/tensorflow/third_party/eigen3/BUILD:33:1: //third_party/eigen3:eigen3 depends on @eigen_archive//:eigen in repository @eigen_archive which failed to fetch. no such package '@eigen_archive//': java.io.IOException: Error downloading [https://storage.googleapis.com/mirror.tensorflow.org/bitbucket.org/eigen/eigen/get/54bca9936424.tar.gz, https://bitbucket.org/eigen/eigen/get/54bca9936424.tar.gz] to /tmpfs/bazel_output/_bazel_kbuilder/f2d52ca1f092ccbe254cc98c3dc90790/external/eigen_archive/54bca9936424.tar.gz: Checksum was d8469c8be9ded39e914a7cd3c1246bae36ab0737d9c173328303766a3c7187e2 but wanted 9edd4860b52813eaf8c023f0de1767ec58e2d67a290b718e6702469208ac5be1

That error is hopefully fixed by this: e3a7bdb

@rthadur rthadur added the kokoro:force-run Tests on submitted change label Dec 5, 2019
@rthadur
rthadur requested a review from aaroey December 5, 2019 13:50
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Dec 5, 2019
@tensorflow-bot tensorflow-bot Bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Dec 5, 2019
@aaroey

aaroey commented Dec 5, 2019

Copy link
Copy Markdown
Member

Also @sanjoy

@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Dec 5, 2019
from __future__ import division
from __future__ import print_function

import tensorflow as tf

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is an error when trying to submit this PR:
'import tensorflow' statements are no allowed inside TF's code base... Please import modules directly.

Also could you help to add a build rule for this file?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This file is not supposed to be used by any test. It's supposed to be used manually by developers to generate a test model if needed. Do we still need to add it to BUILD?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think adding a build rule will make our life easier: we just need to run bazel run to get the model. But I don't have strong opinion. But at least replace import tensorflow with direct module imports.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I removed the import.

I also noticed the test model was missing in the data dependency of trt_convert_test which is fixed now. I missed this because I run tests without bazel :(

I haven't added gen_tftrt_model.py to BUILD. I would need to learn how to do that first. I suggest to postpone this for now.

Pooya Davoodi added 2 commits December 6, 2019 13:34
Also remove gen_tftrt_model.py from BUILD because this file is
not supposed to be used by any test. It's supposed to be
used manually by developers to generate a test model if needed.
aaroey
aaroey previously approved these changes Dec 6, 2019

@aaroey aaroey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the fix Pooya!

@tensorflow-bot tensorflow-bot Bot added the kokoro:force-run Tests on submitted change label Dec 6, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Dec 6, 2019
@pooyadavoodi

Copy link
Copy Markdown
Author

Getting this now:

Missing the following dependencies from pip_packages:

Missing dependency: //tensorflow/python/compiler/tensorrt:test/testdata/tftrt_2.0_saved_model/variables/variables.index
Affected Tests:
//tensorflow/python/compiler/tensorrt:test/testdata/tftrt_2.0_saved_model/variables/variables.index (null)
//tensorflow/python/compiler/tensorrt:trt_convert_test (70635f4b39bbe1d08d95efe3e379ef53)

Missing dependency: //tensorflow/python/compiler/tensorrt:test/testdata/tftrt_2.0_saved_model/variables/variables.data-00000-of-00002
Affected Tests:
//tensorflow/python/compiler/tensorrt:test/testdata/tftrt_2.0_saved_model/variables/variables.data-00000-of-00002 (null)
//tensorflow/python/compiler/tensorrt:trt_convert_test (70635f4b39bbe1d08d95efe3e379ef53)

Missing dependency: //tensorflow/python/compiler/tensorrt:test/testdata/tftrt_2.0_saved_model/variables/variables.data-00001-of-00002
Affected Tests:
//tensorflow/python/compiler/tensorrt:test/testdata/tftrt_2.0_saved_model/variables/variables.data-00001-of-00002 (null)
//tensorflow/python/compiler/tensorrt:trt_convert_test (70635f4b39bbe1d08d95efe3e379ef53)

Missing dependency: //tensorflow/python/compiler/tensorrt:test/testdata/tftrt_2.0_saved_model/saved_model.pb
Affected Tests:
//tensorflow/python/compiler/tensorrt:test/testdata/tftrt_2.0_saved_model/saved_model.pb (null)
//tensorflow/python/compiler/tensorrt:trt_convert_test (70635f4b39bbe1d08d95efe3e379ef53)
Traceback (most recent call last):
  File "pip_smoke_test.py", line 184, in <module>
    main()
  File "pip_smoke_test.py", line 177, in main
    or add no_pip tag to the test.""")
RuntimeError:
    One or more added test dependencies are not in the pip package.
If these test dependencies need to be in TensorFlow pip package, please add them to //tensorflow/tools/pip_package/BUILD.
Else either blacklist the dependencies in //tensorflow/tools/pip_package/pip_smoke_test.py
or add no_pip tag to the test.

What do you suggest?

aaroey
aaroey previously approved these changes Dec 9, 2019
@tensorflow-bot tensorflow-bot Bot added the kokoro:force-run Tests on submitted change label Dec 9, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Dec 9, 2019
@aaroey aaroey added ready to pull PR ready for merge process and removed ready to pull PR ready for merge process labels Dec 10, 2019
@tensorflow-bot tensorflow-bot Bot added the kokoro:force-run Tests on submitted change label Dec 10, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Dec 10, 2019

@aaroey aaroey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unapprove and try to trigger the copybara import again.

@aaroey aaroey removed the ready to pull PR ready for merge process label Dec 10, 2019
@tensorflow-bot tensorflow-bot Bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Dec 10, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Dec 10, 2019
tensorflow-copybara pushed a commit that referenced this pull request Dec 11, 2019
PiperOrigin-RevId: 285002333
Change-Id: I698a30181a97fb48cf3fadffefb1a7a4e046d6d4
@tensorflow-copybara
tensorflow-copybara merged commit d066b24 into tensorflow:master Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes ready to pull PR ready for merge process size:M CL Change Size: Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants