diff --git a/luisa_compute/tests/autodiff.rs b/luisa_compute/tests/autodiff.rs index dbd0902..d419ea9 100644 --- a/luisa_compute/tests/autodiff.rs +++ b/luisa_compute/tests/autodiff.rs @@ -1371,11 +1371,15 @@ fn autodiff_callable2() { let callable = Callable::, Expr, Expr) -> Expr>::new( &device, track!(|x, y, t| { - switch::>(t) - .case(0, || x * 4.0) - .case(1, || x * 2.0) - .case(2, || y * 0.5) - .finish() + let ret = 0.0f32.var(); + outline(|| { + *ret = switch::>(t) + .case(0, || x * 4.0) + .case(1, || x * 2.0) + .case(2, || y * 0.5) + .finish(); + }); + **ret }), ); let kernel = Kernel::::new( diff --git a/luisa_compute_sys/LuisaCompute b/luisa_compute_sys/LuisaCompute index 8eab5cb..e91b0e8 160000 --- a/luisa_compute_sys/LuisaCompute +++ b/luisa_compute_sys/LuisaCompute @@ -1 +1 @@ -Subproject commit 8eab5cb80eafcba6c969258fb8c63b1105580703 +Subproject commit e91b0e8c6d92fb11f9729dc3875d19ef55820bd9