inducer / inducer/loopy

Dropping arguments in inlining

Open
#648 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
636
Forks
81
Avg merge
1d 19h
Merged PRs (30d)
7

Description

Hi. I noticed an issue with the argument passing that has been introduced in https://github.com/inducer/loopy/pull/631 (I believe).

When we inline an inner kernel in a wrapper kernel, where the inner kernels takes many arguments but the code only depends on a subset of it, then in the C code, the inlined kernel only takes a subset of the arguments as parameters. A minimal example can be found here https://gist.github.com/sv2518/d6690f63b6827750fdaed9b01b4d9cea. I noticed that this only happens to `CTargets`, not for whatever Loo.py's default target is.

This is problematic in Firedrake for the vectorisation where we generate a loopy kernel first, do the inlining and vectorisation transformations and C codegen after that, and then pass the arguments dynamically. Meaning the arguments for the kernel before the transformations must be the same as after it. The MFE I linked above is coming from our test suite, the corresponding test is `tests/regression/test_par_loops.py::test_dict_order_parallel.`

Also sorry for the noise recently, it's mostly because I am still trying to get the Firedrake vectorisation PR landed.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.