Skip to content

Shark backend integration #11884

@dan-garvey

Description

@dan-garvey

🚀 Feature

Integrate Shark as an accelerator backend for Lightning.

Motivation

Lightning users would benefit from a "performance first" backend option for running their models. Shark users would benefit from Lightning's clean UX-focused API and clean HW abstraction. Integration seems like a win-win.

Pitch

I'd like to integrate shark as an accelerator similar to how IPUs are implemented. A WIP PR should be incoming soon.

Additional context

Warning- not user friendly (hence the motivation for this issue)

SHARK repo: https://github.com/NodLabs/SHARK/tree/PerformanceDevBranch
Benchmarks: https://github.com/powderluv/transformer-benchmarks
SHARK examples: https://github.com/NodLabs/shark-samples/tree/main/examples

Examples of using torch mlir as a backend for pytorch can be found at:
https://github.com/llvm/torch-mlir/blob/main/examples
resnet jupyter notebook
plain python
Other models like bert can be generated using the heavydep testing instructions at top-level torch-mlir.

cc @Borda @akihironitta @rohitgr7

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIs an improvement or enhancementstrategy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions