Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…utine into next
  • Loading branch information
Mike-Leo-Smith committed Nov 27, 2024
2 parents fe9e65a + 8f5b180 commit 52caeaf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
url = https://github.com/syoyo/tinyexr.git
[submodule "src/compute"]
path = src/compute
url = https://github.com/LuisaGroup/LuisaCompute-coroutine.git
url = git@github.com:LuisaGroup/LuisaCompute-coroutine.git
branch = refactor-api
[submodule "src/ext/json"]
path = src/ext/json
Expand Down
13 changes: 10 additions & 3 deletions src/integrators/coro_path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ class CoroutinePathTracing final : public ProgressiveIntegrator {
_max_depth{std::max(desc->property_uint_or_default("depth", 10u), 1u)},
_rr_depth{std::max(desc->property_uint_or_default("rr_depth", 0u), 0u)},
_rr_threshold{std::max(desc->property_float_or_default("rr_threshold", 0.95f), 0.05f)},
_samples_per_pass{std::max(desc->property_uint_or_default("samples_per_pass", 16u), 1u)},
_samples_per_pass{std::max(desc->property_uint_or_default("samples_per_pass", 64u), 1u)},
_scheduler{[&] {
auto s = desc->property_string_or_default(
"scheduler", luisa::lazy_construct([&] {
return desc->property_string_or_default("scheduler_type", "wavefront");
return desc->property_string("dispatcher");// for compatibility
}));
for (auto &c : s) { c = static_cast<char>(std::tolower(c)); }
if (s == "wavefront") { return Scheduler::Wavefront; }
Expand All @@ -62,12 +62,19 @@ class CoroutinePathTracing final : public ProgressiveIntegrator {
if (desc->has_property("sort")) { _wavefront_config.gather_by_sorting = desc->property_bool("sort"); }
if (desc->has_property("compact")) { _wavefront_config.frame_buffer_compaction = desc->property_bool("compact"); }
if (desc->has_property("instances")) { _wavefront_config.thread_count = std::max<uint>(desc->property_uint("instances"), 1_k); }
if (desc->has_property("threads")) { _wavefront_config.thread_count = std::max<uint>(desc->property_uint("threads"), 1_k); }
if (desc->has_property("max_instance_count")) { _wavefront_config.thread_count = std::max<uint>(desc->property_uint("max_instance_count"), 1_k); }
if (desc->has_property("sort_hints")) { _wavefront_config.hint_fields = desc->property_string_list_or_default("sort_hints"); }
break;
}
case Scheduler::Persistent: {
_persistent_config.shared_memory_soa = true;
_persistent_config = {
.thread_count = 128_k,
.block_size = 64,
.fetch_size = 8,
.shared_memory_soa = true,
.global_memory_ext = true,
};
if (desc->has_property("max_thread_count")) { _persistent_config.thread_count = std::max<uint>(desc->property_uint("max_thread_count"), 5_k); }
if (desc->has_property("threads")) { _persistent_config.thread_count = std::max<uint>(desc->property_uint("threads"), 5_k); }
if (desc->has_property("block_size")) { _persistent_config.block_size = std::max<uint>(desc->property_uint("block_size"), 32u); }
Expand Down

0 comments on commit 52caeaf

Please sign in to comment.