diff --git a/.gitmodules b/.gitmodules index 84c8852..3e35e19 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/src/compute b/src/compute index 1161b00..c93cc73 160000 --- a/src/compute +++ b/src/compute @@ -1 +1 @@ -Subproject commit 1161b00aff97d2540257e956336e16cd655573e2 +Subproject commit c93cc73b9e34d729054cf154a34e0bfd684afa65 diff --git a/src/integrators/coro_path.cpp b/src/integrators/coro_path.cpp index d2de904..da3c0ad 100644 --- a/src/integrators/coro_path.cpp +++ b/src/integrators/coro_path.cpp @@ -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(std::tolower(c)); } if (s == "wavefront") { return Scheduler::Wavefront; } @@ -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(desc->property_uint("instances"), 1_k); } + if (desc->has_property("threads")) { _wavefront_config.thread_count = std::max(desc->property_uint("threads"), 1_k); } if (desc->has_property("max_instance_count")) { _wavefront_config.thread_count = std::max(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(desc->property_uint("max_thread_count"), 5_k); } if (desc->has_property("threads")) { _persistent_config.thread_count = std::max(desc->property_uint("threads"), 5_k); } if (desc->has_property("block_size")) { _persistent_config.block_size = std::max(desc->property_uint("block_size"), 32u); }