Граф коммитов

384 Коммитов

Автор SHA1 Сообщение Дата
Wenbing Li 174e2d72be
Update CODEOWNERS 2023-08-22 17:02:17 -07:00
Scott McKay eb5aef38fb
Make Azure op timeout an attribute (#539)
* Add `timeout_seconds` attribute for per-node timeout. Defaults to (arbitrary) value of 15 seconds.

* Fix datatype - onnx only has int64_t attributes.
Update test model to validate timeout is read correctly.
2023-08-23 08:21:37 +10:00
Sayan Shaw bdd13d7e61
add CLIPTokenizer test for AutoTokenizer (#537)
Co-authored-by: Sayan Shaw <sayanshaw@microsoft.com>
2023-08-21 15:03:42 -07:00
Wenbing Li 396044310e
Add more HF tokenizer supports in gen_processing_models (#531) 2023-08-18 17:09:22 -07:00
kunal-vaishnavi 29c6d66c02
Separate variable definition in Whisper E2E script (#535)
This PR fixes running this script by defining the number of mels and number of frames on separate lines.
2023-08-18 11:17:43 -07:00
Wenbing Li 2b50a82171
Add an environment variable to explicitly enable/disable azureop build (#527)
* Update ci.yml for Azure Pipelines

* Fix the command lines

* is requirements-dev.txt

* switch to windows

* Update windows task

* Update ci.yml for Azure Pipelines

* add cmake in path on windows

* Update ci.yml for Azure Pipelines

* add explicit azure python build flag

---------

Co-authored-by: Sayan Shaw <52221015+sayanshaw24@users.noreply.github.com>
2023-08-17 16:54:45 -07:00
RandySheriffH d853d31fc1
Document azure ops. (#530)
* doc ops (#529)

* Try and make CIs pass with Azure ops enabled by default.
Misc. other cleanups

* Fix some CI issues.
Cleanups some bits and pieces.

* Fix a couple of issues.

* Fix arg to build.bat

* Increase warning in triton client build to make binskim happy (hopefully).

* Try patching the warning level in the triton grpc branch as well. Shouldn't matter but...

* Run triton patch command for windows as well.

* Add patch.exe directly so windows builds work.

* override auth gen for AOAI

* fix build

* switch to windows-static

* update model for azure chat

* document triton invoker

* doc chat endpoint

* document triton invoker

* format

* format

* format

---------

Co-authored-by: Scott McKay <Scott.McKay@microsoft.com>
Co-authored-by: Randy Shuai <rashuai@microsoft.com>

* address comments

* move doc sect

* typo

* typo

---------

Co-authored-by: Scott McKay <Scott.McKay@microsoft.com>
Co-authored-by: Randy Shuai <rashuai@microsoft.com>
2023-08-17 14:12:02 -07:00
Scott McKay 3b947b5580
Minor build and test setup fixes (#523)
* Build fixes
- zlib needs to come from vcpkg if azures ops are being built and opencv isn't enabled
- set the IR version to 8 for some of the azure ops test models so they can be tested when ORT 1.14 is used
- pass through new ort version value so that a consistent version is used to a) pull the ORT package for the c++ unit tests and b) disable azure ops if ORT version is too old.
* Update to automatically chain package to avoid build errors during the install if cmake runs commands in parallel
* Define simplified ORT_FILE for older ORT versions
2023-08-17 15:09:31 +10:00
Wenbing Li ee14fbe48e
correct CLIP tokenizer name (#526) 2023-08-16 12:51:17 -07:00
Wenbing Li 029a2aac14
Only enable azureop build in CI builds (#525)
* Only enable azureop build in CI builds

* correct it

* no $
2023-08-16 12:50:54 -07:00
Scott McKay 486c2b6d79
Android fixes/improvements (#522)
* - Ensure we log an error message before throwing on Android
  - message in exception will be lost due to how the shared libraries are built (both onnxruntime and extensions use static libc++ so there are no shared exception types between them)
- support static or dynamic build of curl/openssl on android
  - TBD which we want to use.
- add infra for anything deriving from BaseKernel to log messages using the ORT logger
  - ensures messages from custom kernels end up in the same place as messages from ORT
2023-08-16 15:17:13 +10:00
Wenbing Li 247d34e30b
Add the new operators in cmake flags files. (#524)
* add the new operators in cmake flags files.

* remove the extra change
2023-08-15 16:06:01 -07:00
Scott McKay 4842e9d6ae
Make CIs pass with Azure ops enabled by default. (#518)
* Make CIs pass with Azure ops enabled by default.
2023-08-12 17:45:59 +10:00
Scott McKay f77a3b8ad2
Update domain in triton test models (#519)
* Update domain in triton test models

* Use 'model_name' everywhere. Test py and model/op were inconsistent.
2023-08-12 12:40:21 +10:00
Sayan Shaw 9ba649e134
Fix HF Fast Tokenizer cvt issue for AutoTokenizer imp (#520)
* Fix GPT2 and Falcon tokenizer cvt for AutoTokenizer imp

* fix fast tokenizer issue

* small fix

* use slow tokenizer in test script

---------

Co-authored-by: Sayan Shaw <sayanshaw@microsoft.com>
2023-08-11 13:17:56 -07:00
Scott McKay cd416e2ab4
Fix LNK4098 warning from sentencepiece forcibly changing the build flags (#516)
* Fix LNK4098 warning from sentencepiece forcibly changing the build flags.

> LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

* Use CMAKE_MSVC_RUNTIME_LIBRARY to determine whether /MT should be used.
2023-08-10 17:03:02 +10:00
Wenbing Li 978ada6d60
Add TrieTokenizer for RWKV-like LLM models (#509)
* Add TrieTokenizer for RWKV-like LLM models

* add more tests

* fix the windows build

* downloading file instead of check in the vocab file

* a small bug fixing
2023-08-08 16:47:38 -07:00
kunal-vaishnavi c8bb9e8abd
Update inputs in Whisper E2E script (#511)
This PR updates the inputs for the inference pass to show the required and optional ones.
2023-08-08 15:46:21 -07:00
Wenbing Li ab5710f82d
More portable Java compiling support in MacOS (#513)
* More portable Java compiling support in MacOS

* Update ext_java.cmake
2023-08-08 10:39:00 -07:00
Scott McKay 2bde82fce9
Refactor setup for Azure ops. Add Android support. (#507)
* Refactor setup for Azure ops to try and make common things more re-usable, and for the actual ops to simply layer in the specific input/output constraints for that type of request.

Currently builds on Linux, Windows (x64 only) and Android

Android requires a manual pre-build of openssl and curl.

Linux requires a manual pre-install of openssl.

Windows currently only works for x64. Other targets need the triplet adjusted.

* Address PR comments

* Fix could of android build warnings.

* Update .gitignore to remove old path

* Fix build break from merge
2023-08-08 19:54:30 +10:00
RandySheriffH 5881931bf2
Test against ort-nightly when packaging Azure ops (#514)
* install ort nightly

* set ver

* install coloredlogs

* install deps

---------

Co-authored-by: Randy Shuai <rashuai@microsoft.com>
2023-08-07 21:47:33 -07:00
Changming Sun 4c2e13e380
Update build-package-for-windows.yml: change machine pool (#515)
Change the machine pool from Win-CPU-2021 to onnxruntime-Win-CPU-2022
2023-08-07 18:06:29 -07:00
Sayan Shaw 997e9ee007
Add Falcon-7b and Falcon-40b tokenizer support (#510)
* Add Falcon-7b and Falcon-40b tokenizer support

* fix alignment and add tokenizer file in test/data to speed up compute

---------

Co-authored-by: Sayan Shaw <sayanshaw@microsoft.com>
2023-08-07 14:37:57 -07:00
Scott McKay d9fa8ea060
Split out some miscellaneous changes from refactoring the azure ops. (#506)
- ifdef out some test code that requires RE2 if RE2 is not enabled
- add ability to plugin custom output validator for C++ unit tests
  - OpenAI responses can have different punctuation. used in the new unit tests that will be in the refactoring PR
2023-08-04 17:53:11 +10:00
RandySheriffH 911c2b2340
Assemble file name for azure audio (#508)
* fix name

* document pipeline param

---------

Co-authored-by: Randy Shuai <rashuai@microsoft.com>
2023-08-03 16:21:29 -07:00
Scott McKay 655bbe890b
Set iOS version for simulator (#505) 2023-08-03 13:57:58 +10:00
RandySheriffH 9e7f8e5b1d
Add UT for Azure Ops during packaging (#502)
* set before-test

* test cmd

* clean in yml

* restore toml

* add ut for triton endpoints

* reset working path

* rename suffix

* install ort

* pip install

* make env

* add extra env

* make executable

* set dir for linux

* add switch

* set env default

* skip tests

* simplify env

* clean env for official

---------

Co-authored-by: Randy Shuai <rashuai@microsoft.com>
Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com>
2023-08-02 17:01:09 -07:00
Wenbing Li 922b7cc387
Add Bert tokenizer in the supported model list and code refinement (#503)
* Add Bert tokenizer in the supported model list and the related code refinement

* utest fix
2023-08-02 14:01:36 -07:00
Wenbing Li 6209804ee9
Update ci.yml for Azure Pipelines (#504)
* Update ci.yml for Azure Pipelines

macOS ci pipeline fixing.

* Update ci.yml for Azure Pipelines

* Update ci.yml for Azure Pipelines

* drop python 3.8 support in macOS due ADO

* fix macos wheel pipeline

* revert the change to add 3.9 back.
2023-08-02 10:54:42 -07:00
Rachel Guo 1ac33abd68
Configure header path for SPM build (#501)
* change header path for ext header file

* spm build ifdef

* fix

* add explaining notes

* update macro name as suggested

---------

Co-authored-by: rachguo <rachguo@rachguos-Mac-mini.local>
2023-07-31 16:35:57 -07:00
Scott McKay e448676a5e
Make kernel Compute method implementations const (#500)
* Nodes can be called concurrently and Compute needs to be stateless due to that.

Update the kernels to make Compute const.

* Fix test that uses ustring.h.

Would be better to not have duplicate declarations for GetTensorMutableDataString and FillTensorDataString in ustring.h and string_tensor.h.
2023-07-28 09:25:36 +10:00
Wenbing Li b8bac85ecd
Add Llama and Llama 2 tokenization supports (#499) 2023-07-26 10:22:00 -07:00
Wenbing Li 01d3905801
fix the android packaging issue (#497) 2023-07-24 17:18:49 -07:00
Wenbing Li 62d8598b6b
Update whisper model test cases and e2e example (#496)
* Update whisper model test cases and e2e example

* fix unit test on windows

* more refinement

* utest fix
2023-07-21 15:27:02 -07:00
RandySheriffH 06d5a8d781
Enable AzureOp packaging (#495)
* generalize azure op

* implement text endpoint

* add parameter to linux whl pipeline

* tune grammer

* 2

* 3

* 4

* 5

* 6

* 7

* 9

* 10

* 11

* 12

* 13

* 14

* 15

* 16

* cancel azure build in ci

* tune cpu tensor check

* try mem name

* address comments

* fix path

* clean env

---------

Co-authored-by: Randy Shuai <rashuai@microsoft.com>
2023-07-20 14:16:08 -07:00
Wenbing Li 981cb049ff
Add a new API for building data processing graph from Huggingface transformers processor/tokenizer (#482)
* initial checkins

* test pass

* basic impl

* first unit test pass

* merge error

* refine a little bit

* add more unit test

* fix unit test

* Fix the unit test.

* add one more whisper audiodecoder test case

* update the docs

* More updates
2023-07-17 16:50:58 -07:00
RandySheriffH c5e7472070
Disable Azure op build (#493)
* disable Azure op build

* keep linux

---------

Co-authored-by: Randy Shuai <rashuai@microsoft.com>
2023-07-17 13:09:56 -07:00
Wenbing Li 66be6bb640
Upgrade gradle wrapper to unblock android CI (#491)
* upgrade gradle wrapper to unblock android CI

* Revert "upgrade gradle wrapper to unblock android CI"

This reverts commit 4df4f253aa.

* set timeout of gradlew

* "re-update it"

* Update gradle-wrapper.properties

* using gradle 8.0.1

* reformat the files

* fix the build.gradle issue

* one more fixing

* delay gradle starts

* rerun the pipeline
2023-07-17 11:15:46 -07:00
Wenbing Li 35408d94b6
fix the ort version assigment bug (#490) 2023-07-14 10:46:35 -07:00
Wenbing Li bab1989644
refine audiodecoder with new api (#489)
* refine audiodecoder with new api

* update std::optional usage for macOS
2023-07-12 13:11:58 -07:00
JiCheng 5d480a8c5d
clip_image_processor (#478)
* clip_image_processor
separate clip ppp

---------

Co-authored-by: Scott McKay <skottmckay@gmail.com>
2023-07-12 17:52:17 +08:00
Sayan Shaw 9774370bf3
Add perf changes for Bert, CLIP and Roberta with offset mapping (#488)
* add perf changes for CLIP and Roberta

* add perf improvement for BERT

* remove global var

---------

Co-authored-by: Sayan Shaw <sayanshaw@microsoft.com>
2023-07-11 10:29:45 -07:00
Wenbing Li e3d9198de8
using the latest Ort header instead of minimum compatible headers (#485)
* using the latest Ort header instead of minimum compatible headers

* Update ext_ortlib.cmake

* Update ortcustomops.def

* change the default ORT API version value
2023-07-10 16:10:11 -07:00
RandySheriffH 27132ced71
Implement azure invokers (#487)
* Implement azure invokers (#486)

* draft azure ops

* migrate triton client

* AzureAudioInvoker works

* triton client builds

* triton invoker works

* limit version

* restore setup.py

* limit ort version

* upgrade version

* pip install cmake

* add ut

* promote ort header version to 1.15.1

* register as cpu op

* limit triton invoker to 1.14 and newer

* remove test

* install rapidjson

* install dep

* sudo install

* install version script

* print err msg

* fix pipeline

* disable from web assembly

* install cmake

* Fix pipelines (#479)

* 1

* 2

* 3

* 4

* 5

* 6

* 7

* 8

* 9

* 10

* 11

* 12

* 13

* 14

* 15

* 16

* 17

* 18

* 19

* 20

* 21

* 22

* 23

* 24

* 25

* 26

* 27

* 28

* 29

* 30

* 31

* 32

* 33

* 34

* 35

* 36

* 37

* 38

* 39

* 40

* 41

* 42

* 43

* 44

* 45

* 46

* 47

* 47

* 48

* 49

* 50

* 51

* 52

* 53

* 54

* 55

* 56

* 57

* 58

* 59

* 60

* 61

* 62

* 62

* 63

* 64

* 65

* 66

* 67

* 68

* 69

* 70

* 71

* 72

* 73

* 74

* 75

* 76

* 77

* 78

* 79:

* 80:

---------

Co-authored-by: Randy Shuai <rashuai@microsoft.com>

* fix pipelines (#481)

* 1

* 2

* 3

* 4

* 5

* 6

* 7

* 8

* 9

* 10

* 11

* 12

* 13

* 14

* 15

* 16

* 17

* 18

* 19

* 20

* 21

* 22

* 23

* 24

* 25

* 26

* 27

* 28

* 29

* 30

* 31

* 32

* 33

* 34

* 35

* 36

* 37

* 38

* 39

* 40

* 41

* 42

* 43

* 44

* 45

* 46

* 47

* 47

* 48

* 49

* 50

* 51

* 52

* 53

* 54

* 55

* 56

* 57

* 58

* 59

* 60

* 61

* 62

* 62

* 63

* 64

* 65

* 66

* 67

* 68

* 69

* 70

* 71

* 72

* 73

* 74

* 75

* 76

* 77

* 78

* 79:

* 80:

* 81

* 82

* 83

* 84

* 85

* 86

---------

Co-authored-by: Randy Shuai <rashuai@microsoft.com>

* test as cpu op

* add ut

* add ut

* move cond

* tune ut

* tune pipeline

* promote to ort 141

* reset header version

* restore cmake

---------

Co-authored-by: Randy Shuai <rashuai@microsoft.com>

* trim changes

* revert req txt

---------

Co-authored-by: Randy Shuai <rashuai@microsoft.com>
2023-07-10 10:07:33 -07:00
Edward Chen b49c0231ab
Move remaining MacOS 12 CI build agents to MacOS 13. (#476)
Pass `-gpu swiftshader_indirect` emulator args as a workaround to get Android emulator running on the MacOS 13 hosted agents.

See https://github.com/actions/runner-images/issues/7671

Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com>
2023-07-05 17:50:54 -07:00
Sayan Shaw d876f7ff82
Initial BertTokenizer offset mapping implementation (#477)
* Initial BertTokenizer offset mapping implementation

* minor change

---------

Co-authored-by: Sayan Shaw <sayanshaw@microsoft.com>
2023-07-03 15:17:23 -07:00
Sayan Shaw afb3e83df2
Change default pad token from 0 to 49407 (#474)
* change defualt pad token from 0 to 49407

* update with GetEncoding

---------

Co-authored-by: Sayan Shaw <sayanshaw@microsoft.com>
2023-06-21 00:11:52 -07:00
Wenbing Li a6012b383e
support vc runtime static linkage (#472)
* support vc runtime static linkage

* typo

* add unit test

* Update ci.yml
2023-06-20 16:40:29 -07:00
Edward Chen b399dd6b38
Update CI build Xcode version and MacOS image. (#471) 2023-06-13 15:01:17 -07:00
Wenbing Li 1f0c76cefa
fix some prefast warnings (#467) 2023-06-07 16:26:45 -07:00