Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor argument passing #631

Merged
merged 2 commits into from
Jun 28, 2022
Merged

Refactor argument passing #631

merged 2 commits into from
Jun 28, 2022

Conversation

inducer
Copy link
Owner

@inducer inducer commented Jun 17, 2022

So this got a bit out of control. It now does many things, see the description of the main commit.

When merging:

  • Mark mypy CI required.

@inducer inducer force-pushed the base-storage-refactor branch 8 times, most recently from 570853b to 700cea5 Compare June 22, 2022 05:19
@inducer inducer changed the title Refactor base_storage and auto strides and offsets Refactor argument passing Jun 22, 2022
@inducer inducer force-pushed the base-storage-refactor branch 9 times, most recently from 66b4532 to b42e69b Compare June 26, 2022 20:19
@inducer inducer force-pushed the base-storage-refactor branch 7 times, most recently from 7df44a6 to 6cb2ba5 Compare June 27, 2022 06:53
@inducer inducer marked this pull request as ready for review June 27, 2022 06:54
@inducer inducer requested a review from kaushikcfd June 27, 2022 06:54
@inducer
Copy link
Owner Author

inducer commented Jun 27, 2022

Hi @kaushikcfd, I know that reviewing this is a big ask, and in a way, this PR is already, erm, "too big to fail". :) I'm not sure I feel OK asking you do do a thorough read of this, but if you could give it a rough look, I would be grateful.

In general, I think this makes things incrementally more sensible/maintainable, and it does contain a few bug fixes. A slightly earlier version did pass all its tests, and I expect the current version to do so, too. If not, I'll address that.

At this point, this is one tangled ball, and I'm not sure there's a point in trying to separate out individual parts. If you feel otherwise, let me know.

Copy link
Collaborator

@kaushikcfd kaushikcfd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

loopy/auto_test.py Show resolved Hide resolved
loopy/codegen/__init__.py Show resolved Hide resolved
loopy/codegen/__init__.py Show resolved Hide resolved
loopy/kernel/__init__.py Show resolved Hide resolved
loopy/kernel/array.py Show resolved Hide resolved
loopy/kernel/data.py Show resolved Hide resolved
loopy/tools.py Outdated Show resolved Hide resolved
- Refactor argument passing so that instead of implicitly-spawned
  `ImplementedDataInfo` objects, there are actual arguments (for
  automatic offsets and strides, base storage, and `sep`-tagged arrays).
  It also centralizes the logic for what goes into argument lists,
  instead of having various "filtered" versions scattered about.
- Get started on type-annotating a bit of loopy.
- Switch a not-small number of data structures to be dataclasses, notably `LoopKernel`.
- Drop OCCA support from the ISPC target. (I'm not aware of any users, ever.)
- Drop the Numba target outright. (I'm not aware of any users, ever.)
- Drop `LoopKernel.local_sizes`, which was usable to directly set the
  workgroup size. (I'm not aware of any users, ever.)
- Expire the deprecation for `iname_to_tags`.
- Bumps the Python compatibility target to 3.8, for `from __future__
  import annotations` and  `cached_property` (mypy does not support
  nested decorators)
- Bug fix: `tags` was not part of `LoopKernel.hash_fields`
- Bug fix: `InstructionBase.get_write_dependency_names()` was used to
  find written variables, `InstructionBase.assignee_var_names()` is
  correct
- Bug fix: KernelExecutorBase now uses linearize() so as to not bypass
  pre-linearization checks (cf. gh-639)
@inducer
Copy link
Owner Author

inducer commented Jun 28, 2022

Thanks for taking a look! I'll give this a scroll myself later and then proceed with merging.

@inducer
Copy link
Owner Author

inducer commented Jun 28, 2022

Scrolled, still looks OK. :) In it goes.

@inducer inducer merged commit 34c7344 into main Jun 28, 2022
@inducer inducer deleted the base-storage-refactor branch June 28, 2022 18:20
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.

2 participants