Skip to content

Commit

Permalink
SEC fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahdhn committed Jan 8, 2025
1 parent f1717d9 commit 299c2de
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions apps/SECHistogram/sec_rxmesh.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -131,29 +131,29 @@ inline void sec_rxmesh(rxmesh::RXMeshDynamic& rx,
max_num_blocks =
std::max(max_num_blocks, DIVIDE_UP(launch_box.blocks, 8));

timers.start("APP");
sec<float, blockThreads><<<DIVIDE_UP(launch_box.blocks, 8),
timers.start("App");
sec<float, blockThreads><<<launch_box.blocks,
launch_box.num_threads,
launch_box.smem_bytes_dyn>>>(
rx.get_context(), *coords, histo, reduce_threshold);

timers.stop("APP");
timers.stop("App");

timers.start("Cleanup");
rx.cleanup();
timers.stop("Cleanup");

timers.start("Slice");
rx.slice_patches(*coords);
timers.stop("Cleanup");
timers.stop("Slice");

timers.start("Cleanup");
rx.cleanup();
timers.stop("Cleanup");
}
}
timers.stop("Total");

CUDA_ERROR(cudaDeviceSynchronize());
CUDA_ERROR(cudaProfilerStop());

RXMESH_INFO("sec_rxmesh() RXMesh SEC took {} (ms), num_passes= {}",
Expand Down
14 changes: 7 additions & 7 deletions apps/SECPriority/secp_rxmesh.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ inline void secp_rxmesh(rxmesh::RXMeshDynamic& rx,
int num_passes = 0;

CUDA_ERROR(cudaProfilerStart());
//PriorityQueueT priority_queue(rx.get_num_edges());
// PriorityQueueT priority_queue(rx.get_num_edges());

timers.start("Total");
while (rx.get_num_vertices(true) > final_num_vertices) {
Expand All @@ -72,7 +72,7 @@ inline void secp_rxmesh(rxmesh::RXMeshDynamic& rx,
// rebuild every round? Not necessarily a great way to use a priority
// queue.
PriorityQueueT priority_queue(rx.get_num_edges());
//priority_queue.clear();
// priority_queue.clear();
to_collapse->reset(false, DEVICE);
rx.update_launch_box(
{Op::EV},
Expand Down Expand Up @@ -165,7 +165,7 @@ inline void secp_rxmesh(rxmesh::RXMeshDynamic& rx,
});

timers.start("App");
secp<float, blockThreads><<<DIVIDE_UP(launch_box.blocks, 8),
secp<float, blockThreads><<<launch_box.blocks,
launch_box.num_threads,
launch_box.smem_bytes_dyn>>>(
rx.get_context(), *coords, *to_collapse);
Expand All @@ -184,9 +184,9 @@ inline void secp_rxmesh(rxmesh::RXMeshDynamic& rx,
timers.stop("Cleanup");

{
//rx.update_host();
//coords->move(DEVICE, HOST);
//EXPECT_TRUE(rx.validate());
// rx.update_host();
// coords->move(DEVICE, HOST);
// EXPECT_TRUE(rx.validate());

// rx.update_polyscope();
//
Expand All @@ -202,7 +202,7 @@ inline void secp_rxmesh(rxmesh::RXMeshDynamic& rx,
}
}
timers.stop("Total");

CUDA_ERROR(cudaDeviceSynchronize());

CUDA_ERROR(cudaProfilerStop());

Expand Down

0 comments on commit 299c2de

Please sign in to comment.