From 024b657967052bb9f0feb3fe095fdc69361e51e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Mon, 23 Sep 2024 14:25:16 +0200 Subject: [PATCH] Revert "REMOVE_ME: add debug printing" This reverts commit 8376161c81257d32a225bb775a389d5711d73a5a. --- src/bvh/collision_object.cpp | 32 -------------------------------- src/bvh/split/cluster.hpp | 1 - 2 files changed, 33 deletions(-) diff --git a/src/bvh/collision_object.cpp b/src/bvh/collision_object.cpp index 2878aa1..c40285c 100644 --- a/src/bvh/collision_object.cpp +++ b/src/bvh/collision_object.cpp @@ -37,7 +37,6 @@ #include "collision_object/top_down.hpp" #include "collision_object/broadphase.hpp" #include "collision_object/narrowphase.hpp" -#include #include namespace bvh @@ -131,39 +130,10 @@ namespace bvh // Ensure that our update of m_impl->snapshots has finished before reading it here Kokkos::fence(); - // REMOVE_ME: this is just to make sure they are in sync - Kokkos::deep_copy( m_impl->splits_h, m_impl->splits ); - for ( std::size_t i = 0; i < od_factor; ++i ) { const auto sbeg = ( i == 0 ) ? 0 : m_impl->splits_h( i - 1 ); const auto send = ( i == m_impl->num_splits ) ? m_impl->split_indices.extent( 0 ) : m_impl->splits_h( i ); - logger().warn( "m_impl->splits_h( 0 ): {}\t", m_impl->splits_h( 0 ) ); const std::size_t nelements = send - sbeg; - // FIXME: differences between GPU and CPU run - // - // CPU: - // [collision_object] [info] initialized collision object 0 - // [collision_object] [debug] obj=0 clustering 96 elements - // [collision_object] [warning] sbeg: 0 send: 47 - // [collision_object] [debug] creating broadphase patch for body 0 size 47 from offset 0 - // [collision_object] [warning] sbeg: 47 send: 96 - // [collision_object] [debug] creating broadphase patch for body 0 size 49 from offset 47 - // - // GPU: - // [collision_object] [info] initialized collision object 0 - // [collision_object] [debug] obj=0 clustering 96 elements - // [collision_object] [warning] sbeg: 0 send: 0 - // [collision_object] [debug] creating broadphase patch for body 0 size 0 from offset 0 - // [collision_object] [warning] sbeg: 0 send: 96 - // [collision_object] [debug] creating broadphase patch for body 0 size 96 from offset 0 - // - // We later run into: - // /distBVH/tests/collision_object_test.cpp:54: FAILED: - // REQUIRE( _tree.count() == od_factor * nranks ) - // with expansion: - // 1 == 2 - // - logger().warn( "sbeg: {}\t send: {}\t", sbeg, send ); logger().debug( "creating broadphase patch for body {} size {} from offset {}", m_impl->collision_idx, nelements, sbeg ); // FIXME_CUDA: should `span` be reworked to use Kokkos::View underneath? Kokkos::deep_copy( m_impl->snapshots_h, m_impl->snapshots ); @@ -490,8 +460,6 @@ namespace bvh Kokkos::View< const std::size_t *, bvh::host_execution_space, Kokkos::MemoryTraits< Kokkos::Unmanaged > > indices_view( _splits.indices.data(), _splits.indices.size() ); Kokkos::View< const std::size_t *, bvh::host_execution_space, Kokkos::MemoryTraits< Kokkos::Unmanaged > > splits_view( _splits.splits.data(), _splits.splits.size() ); - // FIXME: copy to m_impl->splits too? - // Kokkos::deep_copy(m_impl->splits, splits_view); Kokkos::deep_copy( m_impl->splits_h, splits_view ); Kokkos::deep_copy( m_impl->split_indices, indices_view ); } diff --git a/src/bvh/split/cluster.hpp b/src/bvh/split/cluster.hpp index 2b8e06c..89ea792 100644 --- a/src/bvh/split/cluster.hpp +++ b/src/bvh/split/cluster.hpp @@ -96,7 +96,6 @@ namespace bvh assert( m_hashes.extent( 0 ) == _elements.extent( 0 ) ); assert( m_hashes.extent( 0 ) == _indices.extent( 0 ) ); - // REMOVE_ME: debug here? const auto cluster_count = _splits.extent( 0 ); const auto n = m_hashes.extent( 0 );