From f0fd601f8e537977dae45a4c3e7130c6015fbe2c Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Thu, 16 May 2024 13:24:37 +0800 Subject: [PATCH 1/7] minor --- src/integrators/coro_path.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/integrators/coro_path.cpp b/src/integrators/coro_path.cpp index 67f100a..62919fe 100644 --- a/src/integrators/coro_path.cpp +++ b/src/integrators/coro_path.cpp @@ -68,6 +68,7 @@ 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; From e8fa01a844e99d87b62bd39fb3078a480dbaf2c5 Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Thu, 16 May 2024 13:26:16 +0800 Subject: [PATCH 2/7] update --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 22d448a5efa1e49d4a9416f2dd399390afc2b4af Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Thu, 16 May 2024 13:27:16 +0800 Subject: [PATCH 3/7] update submod --- src/compute | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compute b/src/compute index f9c6a88..1161b00 160000 --- a/src/compute +++ b/src/compute @@ -1 +1 @@ -Subproject commit f9c6a8853fee0645fa69e5b35beaae0372937532 +Subproject commit 1161b00aff97d2540257e956336e16cd655573e2 From e20fefdec6dc4f81307f34479cb8de18b29bbdbe Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Thu, 16 May 2024 14:06:55 +0800 Subject: [PATCH 4/7] default options --- src/integrators/coro_path.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/integrators/coro_path.cpp b/src/integrators/coro_path.cpp index 2b326ae..0af5d12 100644 --- a/src/integrators/coro_path.cpp +++ b/src/integrators/coro_path.cpp @@ -40,7 +40,7 @@ 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([&] { @@ -68,7 +68,13 @@ class CoroutinePathTracing final : public ProgressiveIntegrator { 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); } From 593616f8ab87a3f024c3c0fe92c7e86694a1a15a Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Thu, 16 May 2024 14:40:46 +0800 Subject: [PATCH 5/7] update compute --- src/compute | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compute b/src/compute index 1161b00..b2c3620 160000 --- a/src/compute +++ b/src/compute @@ -1 +1 @@ -Subproject commit 1161b00aff97d2540257e956336e16cd655573e2 +Subproject commit b2c36209a91e14a990532343b74b16b2df2f4a05 From 1f8a99876c67c3c210b6dce454a926fd1cb328dd Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Thu, 16 May 2024 16:42:37 +0800 Subject: [PATCH 6/7] update compute --- src/compute | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compute b/src/compute index b2c3620..c93cc73 160000 --- a/src/compute +++ b/src/compute @@ -1 +1 @@ -Subproject commit b2c36209a91e14a990532343b74b16b2df2f4a05 +Subproject commit c93cc73b9e34d729054cf154a34e0bfd684afa65 From 8f5b180f847499c6c26af568905e02be0e5c2385 Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Thu, 16 May 2024 22:15:47 +0800 Subject: [PATCH 7/7] fix scheduler parsing --- src/integrators/coro_path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integrators/coro_path.cpp b/src/integrators/coro_path.cpp index 0af5d12..da3c0ad 100644 --- a/src/integrators/coro_path.cpp +++ b/src/integrators/coro_path.cpp @@ -44,7 +44,7 @@ class CoroutinePathTracing final : public ProgressiveIntegrator { _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; }