Rename Bazel repo iree_vulkan_headers to vulkan_headers (#6862)
TensorFlow used to make it impossible to name Bazel repositories the
same as theirs because they didn't use `maybe`. Now `tf_http_archive`
performs maybe-like behavior and skips the repo if one with the same
name already exists. So now we can use the more normal name for this
Bazel repo. This makes the vulkan headers Bazel repo behave like the
others in the TF build and use the IREE submodule instead of an
`http_archive` from TF. Note though, that the only usage of
`@vulkan_headers` in TF is in a part of a build that we don't use
(TFLite GPU delegate) and uses a target we don't define
("vulkan_headers_no_prototypes"):
https://github.com/tensorflow/tensorflow/blob/1b82ae90a4/tensorflow/lite/delegates/gpu/BUILD#L207
diff --git a/BUILD.bazel b/BUILD.bazel
index c7cb35c..fa040f0 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -20,7 +20,7 @@
# "@iree_pybind11//"
# "@spirv_cross//"
# "@com_google_tracing_framework_cpp//"
-# "@iree_vulkan_headers//"
+# "@vulkan_headers//"
# "@com_github_yaml_libyaml//"
package(
diff --git a/build_tools/bazel/workspace.bzl b/build_tools/bazel/workspace.bzl
index 49ed2d6..e37c06f 100644
--- a/build_tools/bazel/workspace.bzl
+++ b/build_tools/bazel/workspace.bzl
@@ -42,11 +42,9 @@
path = paths.join(iree_path, "third_party/libyaml"),
)
- # TODO(scotttodd): TensorFlow is squatting on the vulkan_headers repo name, so
- # we use a temporary one until resolved. Theirs is set to an outdated version.
maybe(
native.new_local_repository,
- name = "iree_vulkan_headers",
+ name = "vulkan_headers",
build_file = iree_repo_alias + "//:build_tools/third_party/vulkan_headers/BUILD.overlay",
path = paths.join(iree_path, "third_party/vulkan_headers"),
)
diff --git a/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py b/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
index f877e5e..8291e80 100644
--- a/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
+++ b/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
@@ -51,7 +51,7 @@
"@llvm-project//mlir:NVVMDialect": ["MLIRNVVMIR"],
"@llvm-project//mlir:ROCDLDialect": ["MLIRROCDLIR"],
# Vulkan
- "@iree_vulkan_headers//:vulkan_headers": ["Vulkan::Headers"],
+ "@vulkan_headers": ["Vulkan::Headers"],
# Cuda
"@cuda//:cuda_headers": ["cuda_headers"],
# The Bazel target maps to the IMPORTED target defined by FindVulkan().
diff --git a/iree/hal/vulkan/BUILD b/iree/hal/vulkan/BUILD
index 89da86b..5c385ba 100644
--- a/iree/hal/vulkan/BUILD
+++ b/iree/hal/vulkan/BUILD
@@ -96,7 +96,7 @@
"//iree/hal/vulkan/util:intrusive_list",
"//iree/hal/vulkan/util:ref_ptr",
"//iree/schemas:spirv_executable_def_c_fbs",
- "@iree_vulkan_headers//:vulkan_headers",
+ "@vulkan_headers",
"@vulkan_memory_allocator//:impl_header_only",
],
)
@@ -120,7 +120,7 @@
"//iree/base:tracing",
"//iree/base/internal:dynamic_library",
"//iree/hal/vulkan/util:ref_ptr",
- "@iree_vulkan_headers//:vulkan_headers",
+ "@vulkan_headers",
],
)