Merge "Update aos_cli_utils to handle channel aliases"
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/aos/logging/BUILD b/aos/logging/BUILD
index 5f56a50..b08f465 100644
--- a/aos/logging/BUILD
+++ b/aos/logging/BUILD
@@ -35,6 +35,7 @@
visibility = ["//visibility:public"],
deps = [
"//aos:configuration",
+ "//aos/time",
"@com_github_google_glog//:glog",
],
)
diff --git a/aos/logging/log_namer.cc b/aos/logging/log_namer.cc
index 4b65687..d5005bb 100644
--- a/aos/logging/log_namer.cc
+++ b/aos/logging/log_namer.cc
@@ -14,6 +14,9 @@
#include "gflags/gflags.h"
#include "glog/logging.h"
+#include "aos/configuration.h"
+#include "aos/time/time.h"
+
#if defined(__clang)
#pragma clang diagnostic ignored "-Wformat-nonliteral"
#elif defined(__GNUC__)
@@ -49,8 +52,11 @@
PLOG(FATAL) << "readdir(" << d << ") failed";
}
} else {
- const std::string format_string = std::string(basename) + "-%d";
- if (sscanf(dir->d_name, format_string.c_str(), &index) == 1) {
+ char previous_date[512];
+ // Look for previous index and date
+ const std::string format_string = std::string(basename) + "-%d_%s";
+ if (sscanf(dir->d_name, format_string.c_str(), &index, &previous_date) ==
+ 2) {
if (index >= fileindex) {
fileindex = index + 1;
}
@@ -68,7 +74,13 @@
previous[0] = '\0';
LOG(INFO) << "Could not find " << path;
}
- if (asprintf(filename, "%s/%s-%03d", directory, basename, fileindex) == -1) {
+ // Remove subsecond accuracy (after the "."). We don't need it, and it makes
+ // the string very long
+ std::string time_short = aos::ToString(aos::realtime_clock::now());
+ time_short = time_short.substr(0, time_short.find("."));
+
+ if (asprintf(filename, "%s/%s-%03d_%s", directory, basename, fileindex,
+ time_short.c_str()) == -1) {
PLOG(FATAL) << "couldn't create final name";
}
// Fix basename formatting.
diff --git a/compilers/orin_debian_rootfs.BUILD b/compilers/orin_debian_rootfs.BUILD
index 1d174b8..4c1d75b 100644
--- a/compilers/orin_debian_rootfs.BUILD
+++ b/compilers/orin_debian_rootfs.BUILD
@@ -29587,6 +29587,100 @@
)
cc_library(
+ name = "usr_lib_aarch64-linux-gnu_libpanelw.so.6.4",
+ srcs = ["usr/lib/aarch64-linux-gnu/libpanelw.so.6.4"],
+ deps = [
+ ":usr_lib_aarch64-linux-gnu_libc.so.6",
+ ":usr_lib_aarch64-linux-gnu_libncursesw.so.6.4",
+ ":usr_lib_aarch64-linux-gnu_libtinfo.so.6.4",
+ ],
+)
+
+cc_library(
+ name = "usr_lib_aarch64-linux-gnu_libc.so.6",
+ srcs = ["usr/lib/aarch64-linux-gnu/libc.so.6"],
+ deps = [
+ ":usr_lib_aarch64-linux-gnu_ld-linux-aarch64.so.1",
+ ],
+)
+
+cc_library(
+ name = "usr_lib_aarch64-linux-gnu_ld-linux-aarch64.so.1",
+ srcs = ["usr/lib/aarch64-linux-gnu/ld-linux-aarch64.so.1"],
+ deps = [
+ ],
+)
+
+cc_library(
+ name = "usr_lib_aarch64-linux-gnu_libtinfo.so.6.4",
+ srcs = ["usr/lib/aarch64-linux-gnu/libtinfo.so.6.4"],
+ deps = [
+ ":usr_lib_aarch64-linux-gnu_ld-linux-aarch64.so.1",
+ ":usr_lib_aarch64-linux-gnu_libc.so.6",
+ ],
+)
+
+cc_library(
+ name = "usr_lib_aarch64-linux-gnu_libncursesw.so.6.4",
+ srcs = ["usr/lib/aarch64-linux-gnu/libncursesw.so.6.4"],
+ deps = [
+ ":usr_lib_aarch64-linux-gnu_ld-linux-aarch64.so.1",
+ ":usr_lib_aarch64-linux-gnu_libc.so.6",
+ ":usr_lib_aarch64-linux-gnu_libtinfo.so.6.4",
+ ],
+)
+
+cc_library(
+ name = "usr_lib_aarch64-linux-gnu_libmenuw.so.6.4",
+ srcs = ["usr/lib/aarch64-linux-gnu/libmenuw.so.6.4"],
+ deps = [
+ ":usr_lib_aarch64-linux-gnu_ld-linux-aarch64.so.1",
+ ":usr_lib_aarch64-linux-gnu_libc.so.6",
+ ":usr_lib_aarch64-linux-gnu_libncursesw.so.6.4",
+ ":usr_lib_aarch64-linux-gnu_libtinfo.so.6.4",
+ ],
+)
+
+cc_library(
+ name = "usr_lib_aarch64-linux-gnu_libformw.so.6.4",
+ srcs = ["usr/lib/aarch64-linux-gnu/libformw.so.6.4"],
+ deps = [
+ ":usr_lib_aarch64-linux-gnu_ld-linux-aarch64.so.1",
+ ":usr_lib_aarch64-linux-gnu_libc.so.6",
+ ":usr_lib_aarch64-linux-gnu_libncursesw.so.6.4",
+ ":usr_lib_aarch64-linux-gnu_libtinfo.so.6.4",
+ ],
+)
+
+cc_library(
+ name = "usr_lib_aarch64-linux-gnu_libpcre2-32.so.0.11.2",
+ srcs = ["usr/lib/aarch64-linux-gnu/libpcre2-32.so.0.11.2"],
+ deps = [
+ ":usr_lib_aarch64-linux-gnu_ld-linux-aarch64.so.1",
+ ":usr_lib_aarch64-linux-gnu_libc.so.6",
+ ],
+)
+
+cc_library(
+ name = "usr_lib_aarch64-linux-gnu_libpcre2-posix.so.3.0.4",
+ srcs = ["usr/lib/aarch64-linux-gnu/libpcre2-posix.so.3.0.4"],
+ deps = [
+ ":usr_lib_aarch64-linux-gnu_ld-linux-aarch64.so.1",
+ ":usr_lib_aarch64-linux-gnu_libc.so.6",
+ ":usr_lib_aarch64-linux-gnu_libpcre2-8.so.0.11.2",
+ ],
+)
+
+cc_library(
+ name = "usr_lib_aarch64-linux-gnu_libpcre2-8.so.0.11.2",
+ srcs = ["usr/lib/aarch64-linux-gnu/libpcre2-8.so.0.11.2"],
+ deps = [
+ ":usr_lib_aarch64-linux-gnu_ld-linux-aarch64.so.1",
+ ":usr_lib_aarch64-linux-gnu_libc.so.6",
+ ],
+)
+
+cc_library(
name = "usr_lib_aarch64-linux-gnu_libopencv_shape.so.4.6.0-lib",
srcs = ["usr/lib/aarch64-linux-gnu/libopencv_shape.so.4.6.0"],
deps = [
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/frc971/orin/virtual_packages/glib-2.0-dev/DEBIAN/control b/frc971/orin/virtual_packages/glib-2.0-dev/DEBIAN/control
new file mode 100644
index 0000000..a0ff880
--- /dev/null
+++ b/frc971/orin/virtual_packages/glib-2.0-dev/DEBIAN/control
@@ -0,0 +1,7 @@
+Package: glib-2.0-dev
+Version: 2.74.6-2
+Architecture: arm64
+Depends: libglib2.0-dev
+Maintainer: Jim Ostrowski <yimmy13@gmail.com>
+Provides: glib-2.0-dev
+Description: Adapter for glib-2.0-dev
diff --git a/frc971/orin/virtual_packages/libxcb-dev/DEBIAN/control b/frc971/orin/virtual_packages/libxcb-dev/DEBIAN/control
new file mode 100644
index 0000000..6dfad1a
--- /dev/null
+++ b/frc971/orin/virtual_packages/libxcb-dev/DEBIAN/control
@@ -0,0 +1,7 @@
+Package: libxcb-dev
+Version: 1.15-1
+Architecture: arm64
+Depends: libxcb1-dev
+Maintainer: Jim Ostrowski <yimmy13@gmail.com>
+Provides: libxcb-dev
+Description: Adapter for libxcb-dev
diff --git a/frc971/orin/virtual_packages/wayland-dev/DEBIAN/control b/frc971/orin/virtual_packages/wayland-dev/DEBIAN/control
new file mode 100644
index 0000000..4c8c4f7
--- /dev/null
+++ b/frc971/orin/virtual_packages/wayland-dev/DEBIAN/control
@@ -0,0 +1,7 @@
+Package: wayland-dev
+Version: 1.21.0-1
+Architecture: arm64
+Depends: libwayland-dev
+Maintainer: Jim Ostrowski <yimmy13@gmail.com>
+Provides: wayland-dev
+Description: Adapter for wayland-dev
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",
],
)