Skip to content

Commit

Permalink
#5 Updated the automatic choosing of whether to use the in-memory or …
Browse files Browse the repository at this point in the history
…out-of-core diffusion implementation.
  • Loading branch information
carljohnsen committed Sep 11, 2024
1 parent a7d8e21 commit 5d5741a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pybind/diffusion-pybind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ namespace python_api {

#ifdef _OPENACC
const int64_t total_size = N.z * N.y * N.x;
//if (total_size * (sizeof(uint8_t) + (2 * sizeof(float)) + sizeof(uint16_t)) > (1 * 1e9)) { // TODO make automatic
if (total_size * (sizeof(uint8_t) + (2 * sizeof(float)) + sizeof(uint16_t)) > (9 * 1e9)) { // TODO make automatic - set to ~90% of the 3080's 10 GB
if (true) {
const shape_t global_shape = {64, 64, 64};
const shape_t global_shape = { 128, 128, 128 }; // TODO balancing act. Larger results in less wasted compute, while smaller results in more concurrency.
NS::diffusion_out_of_core(voxels, N, global_shape, kernel, kernel_size, repititions, output);
} else {
#endif
Expand Down

0 comments on commit 5d5741a

Please sign in to comment.