fix build due to cupti static link.
PiperOrigin-RevId: 313880914 Change-Id: I4cf691e60fd28e773f124e440ebb30f054d5f2e9
This commit is contained in:
parent
00f027a374
commit
396105ddd5
|
@ -98,11 +98,18 @@ tf_cuda_library(
|
|||
] + tf_additional_cupti_deps(),
|
||||
)
|
||||
|
||||
# Rationale for linkstatic: The symbols in libcupti_static.a have hidden
|
||||
# visibility. The wrapper will fail to find them if it's ever built as a
|
||||
# shared library. This is the same issue as b/11094727. Always linking
|
||||
# the wrapper statically works around the issue. An alternative would be
|
||||
# to patch libcupti_static, but it's not worth the trouble considering
|
||||
# that the wrapper is about the only direct user.
|
||||
tf_cuda_library(
|
||||
name = "cupti_wrapper",
|
||||
srcs = if_cuda_is_configured_compat(["cupti_wrapper.cc"]),
|
||||
hdrs = if_cuda_is_configured_compat(["cupti_wrapper.h"]),
|
||||
copts = tf_copts(),
|
||||
linkstatic = 1,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":cupti_interface",
|
||||
|
|
|
@ -14,6 +14,7 @@ limitations under the License.
|
|||
==============================================================================*/
|
||||
|
||||
#include "third_party/gpus/cuda/extras/CUPTI/include/cupti.h"
|
||||
#include "third_party/gpus/cuda/include/cuda.h"
|
||||
// IWYU pragma: no_include "perftools/gputools/executor/stream_executor.h"
|
||||
#include "tensorflow/stream_executor/lib/env.h"
|
||||
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
||||
|
|
Loading…
Reference in New Issue