Remove cuco cuda library
I intended to use CuCollections for the april tag detector, but it
was slower than cub. Remove it now that we have something we are happy
with.
Change-Id: I65ad5289a798fed858465cd7d1cab62877470309
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/WORKSPACE b/WORKSPACE
index e3fe16d..2371a75 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -1645,18 +1645,6 @@
)
http_archive(
- name = "com_github_nvidia_cuco",
- build_file = "//third_party/cuco:cuco.BUILD",
- patch_args = ["-p1"],
- patches = [
- "//third_party/cuco:template.patch",
- ],
- sha256 = "eecc9a111956a195f28ebc4b4fd23ac6991d072f5c1d7c68a59d059e05d7ad78",
- strip_prefix = "cuCollections-b7514d2010967fdfe4a1d414894bb945bc09fddc",
- url = "https://github.com/NVIDIA/cuCollections/archive/b7514d2010967fdfe4a1d414894bb945bc09fddc.zip",
-)
-
-http_archive(
name = "com_github_nvidia_cccl",
build_file = "//third_party/cccl:cccl.BUILD",
sha256 = "38160c628a9e32b7cd55553f299768f72b24074cc9c1a993ba40a177877b3421",
diff --git a/frc971/orin/BUILD b/frc971/orin/BUILD
index f69fe85..3ffd800 100644
--- a/frc971/orin/BUILD
+++ b/frc971/orin/BUILD
@@ -54,7 +54,6 @@
"//third_party/apriltag",
"@com_github_google_glog//:glog",
"@com_github_nvidia_cccl//:cccl",
- "@com_github_nvidia_cuco//:cuco",
],
)
diff --git a/third_party/cuco/BUILD b/third_party/cuco/BUILD
deleted file mode 100644
index 5b878ee..0000000
--- a/third_party/cuco/BUILD
+++ /dev/null
@@ -1 +0,0 @@
-exports_files(["cuco.BUILD", "template.patch"])
diff --git a/third_party/cuco/cuco.BUILD b/third_party/cuco/cuco.BUILD
deleted file mode 100644
index f88e569..0000000
--- a/third_party/cuco/cuco.BUILD
+++ /dev/null
@@ -1,15 +0,0 @@
-cc_library(
- name = "cuco",
- hdrs = glob(include = ["include/**"]),
- defines = [
- "__CUDACC_RELAXED_CONSTEXPR__",
- "__CUDACC_EXTENDED_LAMBDA__",
- ],
- features = ["cuda"],
- includes = ["include"],
- target_compatible_with = [
- "@//tools/platforms/gpu:nvidia",
- "@platforms//os:linux",
- ],
- visibility = ["//visibility:public"],
-)
diff --git a/third_party/cuco/template.patch b/third_party/cuco/template.patch
deleted file mode 100644
index 488eb9e..0000000
--- a/third_party/cuco/template.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-diff --git a/include/cuco/detail/pair/pair.inl b/include/cuco/detail/pair/pair.inl
-index 3279a91..44be993 100644
---- a/include/cuco/detail/pair/pair.inl
-+++ b/include/cuco/detail/pair/pair.inl
-@@ -51,7 +51,53 @@ __host__ __device__ constexpr bool operator==(cuco::pair<T1, T2> const& lhs,
- } // namespace cuco
-
- namespace thrust {
--#include <cuco/detail/pair/tuple_helpers.inl>
-+template <std::size_t I, typename T1, typename T2>
-+__host__ __device__ constexpr auto get(cuco::pair<T1, T2>& p) ->
-+ typename tuple_element<I, cuco::pair<T1, T2>>::type&
-+{
-+ static_assert(I < 2);
-+ if constexpr (I == 0) {
-+ return p.first;
-+ } else {
-+ return p.second;
-+ }
-+}
-+
-+template <std::size_t I, typename T1, typename T2>
-+__host__ __device__ constexpr auto get(cuco::pair<T1, T2>&& p) ->
-+ typename tuple_element<I, cuco::pair<T1, T2>>::type&&
-+{
-+ static_assert(I < 2);
-+ if constexpr (I == 0) {
-+ return std::move(p.first);
-+ } else {
-+ return std::move(p.second);
-+ }
-+}
-+
-+template <std::size_t I, typename T1, typename T2>
-+__host__ __device__ constexpr auto get(cuco::pair<T1, T2> const& p) ->
-+ typename tuple_element<I, cuco::pair<T1, T2>>::type const&
-+{
-+ static_assert(I < 2);
-+ if constexpr (I == 0) {
-+ return p.first;
-+ } else {
-+ return p.second;
-+ }
-+}
-+
-+template <std::size_t I, typename T1, typename T2>
-+__host__ __device__ constexpr auto get(cuco::pair<T1, T2> const&& p) ->
-+ typename tuple_element<I, cuco::pair<T1, T2>>::type const&&
-+{
-+ static_assert(I < 2);
-+ if constexpr (I == 0) {
-+ return std::move(p.first);
-+ } else {
-+ return std::move(p.second);
-+ }
-+}
- } // namespace thrust
-
- namespace cuda::std {
-diff --git a/include/cuco/detail/static_map.inl b/include/cuco/detail/static_map.inl
-index 48799a7..336f6de 100644
---- a/include/cuco/detail/static_map.inl
-+++ b/include/cuco/detail/static_map.inl
-@@ -443,7 +443,7 @@ __device__
- "insert_and_find is not supported for unpackable data on pre-Volta GPUs.");
- #endif
-
-- auto current_slot{initial_slot(insert_pair.first, hash)};
-+ auto current_slot{this->initial_slot(insert_pair.first, hash)};
-
- while (true) {
- key_type const existing_key = current_slot->first.load(cuda::std::memory_order_relaxed);
-@@ -514,7 +514,7 @@ __device__
-
- // if we couldn't insert the key, but it wasn't a duplicate, then there must
- // have been some other key there, so we keep looking for a slot
-- current_slot = next_slot(current_slot);
-+ current_slot = this->next_slot(current_slot);
- }
- }
-
-diff --git a/include/cuco/detail/static_map/static_map_ref.inl b/include/cuco/detail/static_map/static_map_ref.inl
-index f27f21e..e90948f 100644
---- a/include/cuco/detail/static_map/static_map_ref.inl
-+++ b/include/cuco/detail/static_map/static_map_ref.inl
-@@ -141,21 +141,6 @@ static_map_ref<Key, T, Scope, KeyEqual, ProbingScheme, StorageRef, Operators...>
- return impl_.empty_value_sentinel();
- }
-
--template <typename Key,
-- typename T,
-- cuda::thread_scope Scope,
-- typename KeyEqual,
-- typename ProbingScheme,
-- typename StorageRef,
-- typename... Operators>
--template <typename... NewOperators>
--auto static_map_ref<Key, T, Scope, KeyEqual, ProbingScheme, StorageRef, Operators...>::with(
-- NewOperators...) && noexcept
--{
-- return static_map_ref<Key, T, Scope, KeyEqual, ProbingScheme, StorageRef, NewOperators...>(
-- std::move(*this));
--}
--
- namespace detail {
-
- template <typename Key,
-diff --git a/include/cuco/pair.cuh b/include/cuco/pair.cuh
-index d28cae5..1caaa24 100644
---- a/include/cuco/pair.cuh
-+++ b/include/cuco/pair.cuh
-@@ -87,8 +87,7 @@ struct alignas(detail::pair_alignment<First, Second>()) pair {
- */
- template <typename T, std::enable_if_t<detail::is_std_pair_like<T>::value>* = nullptr>
- __host__ __device__ constexpr pair(T const& p)
-- : pair{cuda::std::get<0>(thrust::raw_reference_cast(p)),
-- cuda::std::get<1>(thrust::raw_reference_cast(p))}
-+ : pair{std::get<0>(thrust::raw_reference_cast(p)), std::get<1>(thrust::raw_reference_cast(p))}
- {
- }
-
-diff --git a/include/cuco/static_map_ref.cuh b/include/cuco/static_map_ref.cuh
-index 88e40f8..7cf1d74 100644
---- a/include/cuco/static_map_ref.cuh
-+++ b/include/cuco/static_map_ref.cuh
-@@ -174,7 +174,11 @@ class static_map_ref
- * @return `*this` with `NewOperators...`
- */
- template <typename... NewOperators>
-- [[nodiscard]] __host__ __device__ auto with(NewOperators... ops) && noexcept;
-+ [[nodiscard]] __host__ __device__ auto with(NewOperators... ops) && noexcept
-+ {
-+ return static_map_ref<Key, T, Scope, KeyEqual, ProbingScheme, StorageRef, NewOperators...>(
-+ std::move(*this));
-+ }
-
- private:
- impl_type impl_; ///< Static map ref implementation
diff --git a/y2024/vision/BUILD b/y2024/vision/BUILD
index 8f0a543..500cad6 100644
--- a/y2024/vision/BUILD
+++ b/y2024/vision/BUILD
@@ -57,7 +57,6 @@
"@com_github_gflags_gflags//:gflags",
"@com_github_google_glog//:glog",
"@com_github_nvidia_cccl//:cccl",
- "@com_github_nvidia_cuco//:cuco",
],
)
diff --git a/y2024_swerve/vision/BUILD b/y2024_swerve/vision/BUILD
index 2951130..7bbfef9 100644
--- a/y2024_swerve/vision/BUILD
+++ b/y2024_swerve/vision/BUILD
@@ -57,7 +57,6 @@
"@com_github_gflags_gflags//:gflags",
"@com_github_google_glog//:glog",
"@com_github_nvidia_cccl//:cccl",
- "@com_github_nvidia_cuco//:cuco",
],
)