-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'profile' of https://github.com/xadupre/tensorflow-onnx …
…into input2
- Loading branch information
Showing
5 changed files
with
59 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT license. | ||
|
||
"""Unit Tests for Benchmarks.""" | ||
import os | ||
import subprocess | ||
from backend_test_base import Tf2OnnxBackendTestBase | ||
from common import check_opset_after_tf_version, unittest_main | ||
|
||
# pylint: disable=missing-docstring,invalid-name,unused-argument,using-constant-test,cell-var-from-loop | ||
# pylint: disable=invalid-name | ||
# pylint: enable=invalid-name | ||
|
||
class ProfileTests(Tf2OnnxBackendTestBase): | ||
|
||
folder = os.path.join(os.path.dirname(__file__), '..', 'tools') | ||
|
||
@check_opset_after_tf_version("2.0", 12, "might need Scan") | ||
def test_profile_conversion_time(self): | ||
filename = os.path.join(ProfileTests.folder, 'profile_conversion_time.py') | ||
proc = subprocess.Popen( | ||
["python", filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE) | ||
try: | ||
outs = proc.communicate(timeout=15)[0] | ||
except subprocess.TimeoutExpired: | ||
proc.kill() | ||
return | ||
assert b"Profile complete." in outs | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest_main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters