NVIDIA / NVIDIA/cutile-python

[FEA]: Generalize autotuning to dynamically generated kernels

Offen
#91 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

feature request status: triaged
Vorherrschende Sprache
Python
Sterne
2.2k
Forks
155
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Is this a new feature, an improvement, or a change to existing functionality?

Improvement

How would you describe the priority of this feature request?

Low (would be nice)

Please provide a clear description of problem this feature solves

Currently, exhaustive_search takes a single fixed kernel and construct arguments from an arbitrary sequence of configurations. That it takes a fixed kernel makes it unusable in its current form if the config objects themselves generates the kernel.

Feature Description

I'm currently using cutile and metaprogramming to generate kernels, with much better success and less pain than other frameworks. However, I can't use exhaustive_search in its current form, but need to modify it to take kernel generating functions.

Describe your ideal solution

The proposal is essentially to change exhaustive_search, or add a separate case, where we generate the kernel candidate from a config, i.e:

    ... 
    for i, cfg in enumerate(search_space):
        if not quiet and isatty:
            progress(0, i, total, len(errors))
        grid = grid_fn(cfg)
        kernel = kernel_fn(cfg)
        hints = hints_fn(cfg) if hints_fn is not None else {}
        updated_kernel = kernel.replace_hints(**hints)
        candidate = _TimingCandidate(
            config=cfg,
            grid=grid,
            kernel=updated_kernel,
            get_args=lambda _cfg=cfg: args_fn(_cfg),
        )
     ...
Describe any alternatives you have considered

No response

Additional context

No response

Contributing Guidelines
  • I agree to follow cuTile Python's contributing guidelines
  • I have searched the open feature requests and have found no duplicates for this feature request

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, den im Issue beschriebenen Einstiegspunkt exhaustive_search und die Verwendung von _TimingCandidate zu lesen. Verfolge anschließend, wie Konfigurationen derzeit Kernel, Grids, Hints und Argumente erzeugen. Die Arbeit ist abgeschlossen, wenn exhaustive_search Kernel und Argumente unterstützen kann, die aus jeder Konfiguration erzeugt wurden, und dabei das bestehende Verhalten mit festen Kernels sowie die Autotuning-Kandidaten erhalten bleiben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
backend, performance
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.