Commit Graph

38 Commits

Author SHA1 Message Date
Vivek Khandelwal
ea920f2955 Add sharded Falcon support 2023-10-26 21:53:25 +05:30
Ean Garvey
e6cb5cef57 Add --additional_runtime_args option and use in OPT example. (#1855)
* Add --additional_runtime_args option and use in OPT example.

Fix the func name. (#1838)

Co-authored-by: Sungsoon Cho <sungsoon.cho@gmail.com>
2023-10-19 13:29:39 -05:00
Ean Garvey
caf6cc5d8f Switch most compile flows to use ireec.compile_file. (#1863)
* Switch most compile flows to use ireec.compile_file.

* re-add input type to compile_str path.

* Check if mlir_module exists before checking if it's a path or pyobject.

* Fix some save_dir cases
2023-10-06 23:04:43 -05:00
Ean Garvey
9697981004 Pipe through a debug option to iree compile utils. (#1796)
* Update compile_utils.py

* Pipe through a flag to toggle debug options in compile utils.

* Update SharkLLMBase.py
2023-08-25 07:11:11 -07:00
Stanley Winata
51a1009796 Add Forward method to SHARKRunner and fix examples. (#1756) 2023-08-14 19:20:37 -07:00
Abhishek Varma
cdd505e2dd [SharkInference-SharkRuntime] Adds capability to mmap vmfbs
-- This commit is based on [VmModule.mmap() API](https://github.com/openxla/iree/pull/14124).
-- It thereby adds capability to mmap vmfbs in SHARK.

Signed-off-by: Abhishek Varma <abhishek@nod-labs.com>
2023-06-22 20:43:40 +05:30
Ean Garvey
a504903dd5 Fix formatting issues. (#903) 2023-02-01 09:12:45 +05:30
Eliasj42
8111f8bf35 added ability to select gpu (#891)
Co-authored-by: Elias Joseph <elias@nod-labs.com>
2023-01-30 13:39:12 -08:00
Abhishek Varma
e60b4568c6 [SharkInference] Make SharkInference compile the entire module (#708)
* [SharkInference] Make SharkInference compile the entire module

-- Previously SharkInference was compiling and providing run APIs
   for a harcoded function with function name "forward".
-- This commit makes the compiling functionality generic and now
   any function being defined within the module can be run.
-- It also creates an API to fetch all the function names defined
   within the compiled module.
-- This commit updates both web and command-line execution of Stable
   Diffusion to use new API of  SharkInference.

Signed-off-by: Abhishek Varma <abhishek@nod-labs.com>
2023-01-03 23:25:23 +05:30
Quinn Dawkins
2bc6de650d [SD] Add support for a compiled version of the discrete Euler scheduler (#657)
* Add Shark version of euler scheduler

* Add Shark version of euler scheduler to web ui
2022-12-17 19:25:43 -08:00
aldesilv
f80b85f10c dump spv for dispatches (#509) 2022-11-23 22:34:27 -06:00
Phaneesh Barwaria
d9f4a9954a modify to get correct target triple (#485) 2022-11-13 20:13:44 -08:00
Eliasj42
7f37599a60 Added a dispatch benchmarking tool (#441)
To produce benchmarks of individual dispatches, you can add --dispatch_benchmarks=All --dispatch_benchmarks_dir=<output_dir> to your command line argument.

Co-authored-by: Elias Joseph <elias@nod-labs.com>
2022-10-28 14:31:03 -07:00
Ean Garvey
fd7baae548 Serialize torch-mlir CAPI module as bytecode instead of string. (#435)
* Serialize torch-mlir CAPI as bytecode instead of string.

* Minor fixes to MLIR data handling in SHARK python.
2022-10-27 14:37:15 -05:00
Quinn Dawkins
1d33913d48 Add option to save and load precompiled flatbuffer (#425) 2022-10-23 16:24:09 -07:00
Quinn Dawkins
7be1d7d0be Add option for extra arguments through SharkInference.compile (#408) 2022-10-19 15:32:48 -05:00
Ean Garvey
d82b305781 Fix issues with loading .vmfb into SharkInference 2022-09-23 09:53:13 +05:30
Prashant Kumar
4e5c592094 Enable --devices to pass through CLI. 2022-07-27 22:13:52 +05:30
Ean Garvey
6401687733 Update TF pytest marks and fix benchmark runner import. (#196) 2022-07-19 15:42:32 -05:00
Ean Garvey
c5ae01311d Make PyTorch model tests importer-independent and add benchmarks. 2022-07-15 21:54:41 -05:00
Prashant Kumar
0dcf387089 Add shark_importer for torch_models. (#183)
All the torch_models are imported to gs::shark_tank.
Scripts have been updated.
2022-07-12 20:38:19 -07:00
Anush Elangovan
a7435973d9 Fix black formatting 2022-06-30 20:42:02 +00:00
Prashant Kumar
83855e7b08 Capture input information from mlir_graph and generate random inputs. 2022-06-29 22:51:53 +05:30
Prashant Kumar
b07377cbfd Refactor the shark_runner shark_inference to only support mlir_modules.
1. The shark_inference is divided into shark_importer and
   shark_inference.
2. All the tank/pytorch tests have been updated.
2022-06-28 18:46:18 +05:30
Prashant Kumar
e8aa105b2a Divide iree_utils and do module imports on function calls. 2022-06-22 14:17:33 +05:30
Ean Garvey
08eda2ce35 Equip TF tests with save_mlir, save_vmfb, and benchmark to .csv options. (#148) 2022-06-21 21:54:44 -07:00
Chi_Liu
af582925f2 Enable tosa.mlir as input for SharkImporter inference (#145)
* Change shark_importer to use tosa.mlir as tflite model input from  local gen_shark_tank
2022-06-20 23:15:14 -07:00
Prashant Kumar
4d3acff484 Add tf masked lm models (17 models - 12 pass, 5 fail). (#135) 2022-06-16 07:28:00 -07:00
Prashant Kumar
380b0b7c54 Add seq_classification shark module to run seq_classification
on hugging face supported models.
2022-06-14 22:36:19 +05:30
Stanley Winata
e48642f8a5 Update benchmark command to ToM and Add to test (#125)
-Update benchmark_cl to latest benchmark_module API
-tensorflow OOM issue.
2022-06-13 23:57:05 -07:00
Ean Garvey
cbd131d588 Refactor testing framework. (#117) 2022-06-12 20:15:30 -07:00
Chi_Liu
8640c3ebfe Add shark_importer tflite module and albert_shark_test example (#110) 2022-06-09 06:17:22 -07:00
Prashant Kumar
9d2ce33bd1 yapf format python files.
Please use `yapf -i --style .style.yapf shark/*.py` to format python
files.
2022-06-06 14:34:59 +05:30
yzhang93
16c50cac15 Add the option to use tuned model in shark_runner (#79) 2022-06-02 18:25:33 -07:00
Prashant Kumar
cee02f6a61 Add frontend error checks. 2022-05-27 15:45:45 +05:30
Prashant Kumar
e5517f63f5 Add the refactored training module. 2022-05-27 14:21:34 +05:30
stanley
91867e1fc2 Add Shark Benchmark
-Introduce SharkBenchmark that bench models on regular torch, shark-py, and shark-c.
-Integrate iree-benchmark-module into Shark.
2022-05-27 00:07:31 +00:00
Prashant Kumar
15c99adab8 Refactor the whole SharkInference API.
1. SharkInference API is refactored to target any frontends or files,
   i.e. pytorch, tensorflow, mhlo, linalg, tosa.
2. Refactor all torch APIs.
2022-05-26 18:55:47 +05:30