Skip to content

Instantly share code, notes, and snippets.

@DimanNe
Created July 9, 2017 15:01
Show Gist options
  • Save DimanNe/6a2ae5e39be72f4773256a0f78e84c5a to your computer and use it in GitHub Desktop.
Save DimanNe/6a2ae5e39be72f4773256a0f78e84c5a to your computer and use it in GitHub Desktop.
--start-lib
bazel-out/local-dbg/bin/tensorflow/core/_objs/gpu_lib/tensorflow/core/common_runtime/gpu/gpu_event_mgr.pic.o
--end-lib
bazel-out/local-dbg/bin/tensorflow/cc/_objs/real_math_grad/tensorflow/cc/gradients/real_math_grad.pic.o
@DimanNe
Copy link
Author

DimanNe commented Jul 9, 2017

cc_library(
name = "real_math_grad",
srcs = ["gradients/real_math_grad.cc"],
deps = [
":cc_ops",
":grad_op_registry",
":ops",
":scope",
"//tensorflow/core:core_cpu",
"//tensorflow/core:framework",
],
alwayslink = 1,
)

@DimanNe
Copy link
Author

DimanNe commented Jul 9, 2017

cc_library(
name = "math_grad",
srcs = [
"ops/math_grad.cc",
"ops/random_grad.cc",
],
linkstatic = 1, # Needed since alwayslink is broken in bazel b/27630669
visibility = ["//visibility:public"],
deps = [
":framework",
":lib",
":math_ops_op_lib",
],
alwayslink = 1,
)

@DimanNe
Copy link
Author

DimanNe commented Jul 9, 2017

$ nm bazel-out/local-dbg/bin/tensorflow/cc/DimanNe/bitwise_operations/bitwise_operations | grep GLOBAL | grep math_grad
0000000003038921 t _GLOBAL__sub_I_math_grad.cc
00000000033f81c8 t _GLOBAL__sub_I_real_math_grad.cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment