Skip to content

Conversation

@unit-of-inductance
Copy link

Fixes #1616.

Adds new caching mechanism for elem_apply similar to the existing ones for call, etc. It would probably be possible to make this more efficient by caching later within elem_apply to avoid more computations, but my main goal was to avoid calling make_mlir_fn repeatedly, which was causing #1616.

I have also added tests in the branch PassingElemApplyCachingTest on my fork, but this required reducing the function limit in __lookup_unique_name_in_module to 10 (otherwise tests would take very long to run to get to the previous limit of 10000). The tests also can be seen to fail in the FailingElemApplyCachingTest branch, which is missing the commit from this PR.

If the maintainers would prefer, I can merge the tests into the current PR, though this would have to come with a decrease in the __lookup_unique_name_in_module limit as far as I can see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Could not find unique name for Reactant.TracedUtils.TypeCast{Float64}()_broadcast_scalar when compiling function with lots of matrix multiplications

1 participant