From e393216f35f5afb4a6101be6e40ff53106bdc7fc Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Fri, 15 Nov 2024 14:54:25 +0530 Subject: [PATCH] fix: handle removal of `Lux.NilSizePropagation.recursively_nillify` --- ext/SymbolicsLuxExt.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/SymbolicsLuxExt.jl b/ext/SymbolicsLuxExt.jl index b4dfcab51..0086982c6 100644 --- a/ext/SymbolicsLuxExt.jl +++ b/ext/SymbolicsLuxExt.jl @@ -5,8 +5,10 @@ using Symbolics using Lux.LuxCore using Symbolics.SymbolicUtils -function Lux.NilSizePropagation.recursively_nillify(x::SymbolicUtils.BasicSymbolic{<:Vector{<:Real}}) - Lux.NilSizePropagation.recursively_nillify(Symbolics.wrap(x)) +@static if isdefined(Lux.NilSizePropagation, :recursively_nillify) + function Lux.NilSizePropagation.recursively_nillify(x::SymbolicUtils.BasicSymbolic{<:Vector{<:Real}}) + Lux.NilSizePropagation.recursively_nillify(Symbolics.wrap(x)) + end end @register_array_symbolic LuxCore.stateless_apply(