This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a Timer class to enable logging of time taken by various stages in NGraphEncapsulate::Compute(). Also enabled printing detailed version information
- Loading branch information
1 parent
260b208
commit 2f078e4
Showing
6 changed files
with
143 additions
and
62 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
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,39 @@ | ||
/******************************************************************************* | ||
* Copyright 2019 Intel Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*******************************************************************************/ | ||
#ifndef NGRAPH_TF_BRIDGE_TIMER_H_ | ||
#define NGRAPH_TF_BRIDGE_TIMER_H_ | ||
|
||
#include <chrono> | ||
|
||
namespace tensorflow { | ||
namespace ngraph_bridge { | ||
|
||
class Timer { | ||
public: | ||
Timer() : m_start(std::chrono::high_resolution_clock::now()) {} | ||
int ElapsedInMS() { | ||
return std::chrono::duration_cast<std::chrono::milliseconds>( | ||
std::chrono::high_resolution_clock::now() - m_start) | ||
.count(); | ||
} | ||
|
||
private: | ||
const std::chrono::time_point<std::chrono::high_resolution_clock> m_start; | ||
}; | ||
} // namespace ngraph_bridge | ||
} // namespace tensorflow | ||
|
||
#endif // NGRAPH_TF_BRIDGE_TIMER_H_ |
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