Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #define guards for get_xxx_tensorrt_version() to fix an internal ci build error. #20295

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions tensorflow/contrib/tensorrt/trt_conversion.i
Original file line number Diff line number Diff line change
Expand Up @@ -221,22 +221,26 @@ std::pair<string, string> calib_convert(
#endif // GOOGLE_CUDA && GOOGLE_TENSORRT
}

version_struct get_linked_tensorrt_version(){
version_struct get_linked_tensorrt_version() {
// Return the version at the link time.
const auto &lv = tensorflow::tensorrt::convert::GetLinkedTensorRTVersion();
version_struct s;
#if GOOGLE_CUDA && GOOGLE_TENSORRT
const auto &lv = tensorflow::tensorrt::convert::GetLinkedTensorRTVersion();
s.vmajor = lv[0];
s.vminor = lv[1];
s.vpatch = lv[2];
#endif // GOOGLE_CUDA && GOOGLE_TENSORRT
return s;
}
version_struct get_loaded_tensorrt_version(){
// Return the version from the loaded library.
const auto &lv = tensorflow::tensorrt::convert::GetLoadedTensorRTVersion();
version_struct s;
#if GOOGLE_CUDA && GOOGLE_TENSORRT
const auto &lv = tensorflow::tensorrt::convert::GetLoadedTensorRTVersion();
s.vmajor = lv[0];
s.vminor = lv[1];
s.vpatch = lv[2];
#endif // GOOGLE_CUDA && GOOGLE_TENSORRT
return s;
}

Expand Down