Skip to content

Commit cdb8c69

Browse files
authored
trying to make build work (#1418)
* trying to make build work * dev * no bzlmod * simplify
1 parent e801f01 commit cdb8c69

File tree

3 files changed

+30
-25
lines changed

3 files changed

+30
-25
lines changed

deps/ReactantExtra/.bazelrc

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
build --announce_rc
22

33
# TODO: Migrate for https://github.com/bazelbuild/bazel/issues/7260
4-
common --repo_env=USE_PYWRAP_RULES=True
54
common --noincompatible_enable_cc_toolchain_resolution
65
common --experimental_repo_remote_exec
76
common --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
87
common --cxxopt=-w --host_cxxopt=-w
98
common --define=grpc_no_ares=true
10-
common --define=tsl_link_protobuf=true
11-
common --define open_source_build=true
12-
common
13-
common --define framework_shared_object=true
14-
common --define tsl_protobuf_header_only=true
15-
common --define=use_fast_cpp_protos=true
16-
common --define=allow_oversize_protos=true
9+
common --noenable_bzlmod
10+
11+
build --repo_env=USE_PYWRAP_RULES=True
12+
build --copt=-DGRPC_BAZEL_BUILD
13+
build --host_copt=-DGRPC_BAZEL_BUILD
14+
build --action_env=GRPC_BAZEL_RUNTIME=1
15+
build --repo_env=PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=upb
16+
build --action_env=PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=upb
17+
build --repo_env=RULES_PYTHON_ENABLE_PYSTAR=0
18+
# Do not do this. This is how gRPC builds itself by default, but we don't want
19+
# that as it would link protobuf into its own set of dynamic libraries, which
20+
# would conflict with our protobuf linkage.
21+
#build --define=use_fast_cpp_protos=true
1722

1823
build -c opt
1924

deps/ReactantExtra/BUILD

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -763,10 +763,10 @@ cc_library(
763763
) + [
764764
"@enzyme_ad//src/enzyme_ad/jax:gpu.cc",
765765
"@enzyme_ad//src/enzyme_ad/jax:cpu.cc",
766-
"@xla//xla/service/gpu:backend_configs.pb.cc",
767-
"@xla//xla:autotuning.pb.cc",
768-
"@xla//xla:autotune_results.pb.cc",
769-
"@xla//xla/service:buffer_assignment.pb.cc",
766+
# "@xla//xla/service/gpu:backend_configs.pb.cc",
767+
# "@xla//xla:autotuning.pb.cc",
768+
# "@xla//xla:autotune_results.pb.cc",
769+
# "@xla//xla/service:buffer_assignment.pb.cc",
770770
],
771771
hdrs = glob([
772772
"*.h",
@@ -944,8 +944,8 @@ cc_library(
944944
"@xla//xla/service/spmd/shardy/stablehlo_round_trip:export_shardings",
945945
"@xla//xla/service/spmd/shardy/stablehlo_round_trip:stablehlo_import",
946946

947-
"@xla//xla:xla_proto_cc",
948-
"@xla//xla:xla_proto_cc_impl",
947+
# "@xla//xla:xla_proto_cc",
948+
# "@xla//xla:xla_proto_cc_impl",
949949
"@xla//xla/stream_executor:device_description_proto_cc_impl",
950950

951951
"@xla//xla/tsl/platform/default:platform_port",
@@ -976,7 +976,7 @@ cc_library(
976976
"@xla//xla/python/ifrt/hlo:hlo_program",
977977
"@xla//xla/python/ifrt/ir:ifrt_ir_program",
978978
"@xla//xla/ffi:call_frame",
979-
"@com_google_protobuf//:protobuf",
979+
# "@com_google_protobuf//:protobuf",
980980

981981
"@tsl//tsl/profiler/lib:profiler_session_impl",
982982
"@tsl//tsl/profiler/lib:profiler_factory_impl",

deps/ReactantExtra/WORKSPACE

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,16 @@ http_archive(
171171
urls = ["https://github.com/EnzymeAD/Enzyme/archive/{commit}.tar.gz".format(commit = ENZYME_COMMIT)],
172172
)
173173

174-
http_archive(
175-
name = "upb",
176-
sha256 = "61d0417abd60e65ed589c9deee7c124fe76a4106831f6ad39464e1525cef1454",
177-
strip_prefix = "upb-9effcbcb27f0a665f9f345030188c0b291e32482",
178-
patch_cmds = [
179-
"sed -i.bak0 's/@bazel_tools\\/\\/platforms:windows/@platforms\\/\\/os:windows/g' BUILD",
180-
"sed -i.bak0 's/-Werror//g' BUILD"
181-
],
182-
url = "https://github.com/protocolbuffers/upb/archive/9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz"
183-
)
174+
# http_archive(
175+
# name = "upb",
176+
# sha256 = "61d0417abd60e65ed589c9deee7c124fe76a4106831f6ad39464e1525cef1454",
177+
# strip_prefix = "upb-9effcbcb27f0a665f9f345030188c0b291e32482",
178+
# patch_cmds = [
179+
# "sed -i.bak0 's/@bazel_tools\\/\\/platforms:windows/@platforms\\/\\/os:windows/g' BUILD",
180+
# "sed -i.bak0 's/-Werror//g' BUILD"
181+
# ],
182+
# url = "https://github.com/protocolbuffers/upb/archive/9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz"
183+
# )
184184

185185
load("@jax//third_party/xla:workspace.bzl", jax_xla_workspace = "repo")
186186
jax_xla_workspace()

0 commit comments

Comments
 (0)