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

48 Коммитов

Автор SHA1 Сообщение Дата
Wenbing Li e710d80f71
Improve Documentation: Add Hugging Face Compatibility Docs and Refine the existing docs (#818)
* add compatibility docs

* continue updating the doc

* updating doc 2

* revert the bpe changes
2024-09-30 13:04:33 -07:00
Wenbing Li 2d02a687be
Optimize the tokenizer for efficiency (#797)
* optimize the tokenizer for efficiency

* fix the unit test failures.

* fix the api test case failures

* removed the unused code.

* More test cases fixings

* One more fixing

* fix macOS build issues

* refine the test

* add more diagnosis info.

* fix unit test in CI Linux

* fix the pp_api test failure
2024-08-27 18:57:50 -07:00
Wenbing Li 8f2c35fad0
Add more tests for pre-processing C APIs (#793)
* initial api for tokenizer

* More fixings and test data refinement

* add a simple wrapper for pre-processing APIs

* fix the test issues

* test if the tokenizer is spm based

* fix the failed test cases

* json pointer does not work
2024-08-21 16:48:39 -07:00
Zhipeng Han 85ffb94169
Update custom_ops.md (#795)
add domain for SentencePiece Op
2024-08-21 09:52:54 -07:00
Wenbing Li be29e28dd7
support tokenizers build only in C API mode (#783)
* support tokenizer build only in C API mode

* fix the python build.

* fix the selectedops build

---------

Co-authored-by: Sayan Shaw <52221015+sayanshaw24@users.noreply.github.com>
2024-08-02 13:28:58 -07:00
Wenbing Li 620050fbe0
reimplement resize cpu kernel for image processing (#768)
* reimplement resize cpu kernel for image processing

* accuracy fixing and code refinement

* fix the build issues

* fix Linux build issue

* more fixings

* Fix the pipeline issue

* fix the ci script

* try to fix CUDA machine pool
2024-07-23 15:40:52 -07:00
Wenbing Li 8153bc1a3a
Feature extraction C API for whipser model (#755)
* Feature extraction C API for whipser model

* Update the docs

* Update the docs2

* refine the code

* fix some issues

* fix the Linux build

* fix more data consistency issue

* More code refinements
2024-07-11 11:20:36 -07:00
cao lei 95d65e4ec0
sync to flash attention kernel 2.5.9 and add document of how to write custom op (#757)
* sync to flash attention kernel 2.5.9

* support users to overload GetMayInplace and ReleaseMayInplace

* Undo the change for pybind11 dependency
2024-07-10 07:09:40 -07:00
Wenbing Li 3c22daa4cf
disable azure ops from ci/packaging pipelines (#746)
* disable azure ops from ci/packaging pipelines

* add the missed files

* keep the env variable flag

* add python to the path?
2024-06-13 21:11:55 -07:00
cao lei 3649db065d
Introduce ONNXRUNTIME_PKG_DIR parameter to pip install (#719)
* introduce ONNXRUNTIME_PKG_DIR parameter to pip install

* update document
2024-05-17 05:58:37 -07:00
Wenbing Li 5d558bd34f
Refine the cuda build support (#680) 2024-03-27 10:08:07 -07:00
cao lei 2234001184
refactor ORT-Extension for the coming GroupQueryAttention work (#674)
* refactor ORT-Extension for the coming GroupQueryAttention work

* fix typo and add #if ORT_API_VERSION >= 15 for GetOrtAllocator

* fix cuda build
2024-03-20 10:55:04 -07:00
Wenbing Li 972cb17a82
clean up requirements.txt and developer docs (#655) 2024-02-16 15:47:44 -08:00
Wenbing Li dce0d9c72c
Add the missing tasks and fix the issues in CUDA python unit test pipelines (#615)
* add an experimental CUDA python unit test pipeline

* typo

* in ci.yml?

* winpycuda

* move it in optional

* enable cuda pytest in linuxbuild

* build in docker

* add the cuda pytest for windows

* cuda flag fixing

* minor fixing

* typo

---------

Co-authored-by: Yi Zhang <zhanyi@microsoft.com>
2023-12-08 10:19:54 -08:00
Wenbing Li fb2a8c2841
Enhancing CUDA Support in Python Package Build and Testing (#608)
* initial commit

* Add the cuda support for python package

* formt the code

* refine it a little bit
2023-11-27 15:39:52 -08:00
Sayan Shaw 5fd6bcf4d6
Add test .nuspec for Windows and respective docs (#585)
* add test .nuspec for Windows and respective docs

* minor doc change

* keep only x64 file entry and use build.bat output dll

---------

Co-authored-by: Sayan Shaw <sayanshaw@microsoft.com>
Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com>
2023-10-30 23:34:51 -07:00
RandySheriffH 4cc985fa32
Update Azure Op doc for main (#554)
* Add details to Azure ops documentation (#552)

* doc ops

* typo

---------

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

* rename the input and output as example

---------

Co-authored-by: Randy Shuai <rashuai@microsoft.com>
2023-08-31 12:57:47 -07:00
Sayan Shaw d39e8444b6
Add initial API docs generation and publishing (#540)
* initial api-docs implementation

* change pip install extensions

* add examples README as it is needed to build Sphinx gallery + some minor changes

* call sphinx directly from workflow

* fixed commit id issue for workflow

* fix path issue in publish-python-apidocs.yml

* add tools API and cleanup

* update copyright from current year

---------

Co-authored-by: Sayan Shaw <sayanshaw@microsoft.com>
2023-08-29 20:28:48 -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
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
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
Wenbing Li 1c04e95bda
upgrade all dependency versions (#466)
* release the dependency package version

* upgrade the dependency versions

* more fixing for 3.11

* Update ci.yml

* upgrade torch version in MacOS

* fix torch version in MacOS

* upgrade Python support versions

* pybind11 switch URL mode

* more URL modes
2023-06-03 20:09:41 -07:00
Wenbing Li 46efcb9051
PyOp attribute supports int and float data type (#425) 2023-05-05 19:35:59 -07:00
Wenbing Li b5dce955f0
Add an audio decoder custom op for whisper end-to-end processing (#385)
* evaluate the audio decoder library

* MP3 Decoder

* rename it to test_audio_codec

* add the audio decoder to whisper model

* whisper end-to-end draft

* fix the mp3 decoder

* Running with ONNX models

* Add more audio format supports

* refine the end-to-end script

* Update operators/audio/audio_decoder.hpp

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>

* Update operators/audio/audio_decoder.hpp

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>

* Update operators/audio/audio_decoder.hpp

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>

* some fixings of comments and more test cases.

* changes for review comments.

* Update audio_decoder.hpp

* Update audio_decoder.hpp

* code refinement

* Update operators/audio/audio_decoder.hpp

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>

---------

Co-authored-by: Sayan Shaw <52221015+sayanshaw24@users.noreply.github.com>
Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
2023-04-11 14:47:10 -07:00
Wenbing Li 9c93fade6f
add the onnxruntime 1.14 release into the CI pipeline (#387)
* add the onnxruntime 1.14 release into the CI pipeline

* torch 2.0 crashed on Linux
2023-03-27 16:52:08 -07:00
Edward Chen 63fe165ee8
Android package build updates (#344)
- Generate AAR with associated artifacts (javadoc.jar, sources.jar, pom).
- Fix JAR/AAR package descriptions.
- Remove `gradle -b build-android.gradle` invocation from CMake. This creates the AAR and it is not necessary to run it for each Android ABI build.
- Support building on Windows.
2023-01-13 14:06:00 -08:00
Edward Chen 280ec289cb
Use `object` instead of `np.object` and `str` instead of `np.str`. (#337) 2022-12-19 18:45:07 -05:00
Wenbing Li 13a438234e
Fix the include path issue on the ORT combined build. (#325)
* test ci pipeline

* trigger ci

* correct ORT include path

* remove unwanted script

* fixing supres code with codecs off
2022-12-16 10:48:45 -08:00
Wenbing Li 69e6ec7cf1
doc of how to add an operator 2022-12-09 10:52:40 -08:00
Wenbing Li 0647ce6d14
update the main doc and add a developer doc (#321)
* update the main doc and add a developer doc

* add it back

* fix some typo

* Update README.md

Co-authored-by: Nat Kershaw (MSFT) <nakersha@microsoft.com>

Co-authored-by: Nat Kershaw (MSFT) <nakersha@microsoft.com>
2022-12-02 16:27:58 -08:00
Wenbing Li 08659eae90
Initial Java API for the JAR package. (#292)
* more C++ code fixing and polish for release

* fixing for android build

* build flags for android release

* add missing exporting function

* imint

* first versoin

* more C++ code fixing and polish for release (#275)

* more C++ code fixing and polish for release

* fixing for android build

* build flags for android release

* add missing exporting function

* support build_id on Python package building (#281)

* support buildid in package building

* undo the change on build.sh

* build.sh issue on macos

* Add `$schema` to `cgmanifest.json` (#284)

Co-authored-by: Jamie Magee <jamie.magee@microsoft.com>

* test package with a simple java app

* demo app

* some fixing for windows platform

* refine the example app

* fix the missing symobls issue for Linux build

* fix the package package build issue

* typo

* a missing change

* fix PythonOp

* fix Android test issue

* one more Android change

* replace build flags in ci pipeline

* android AAR package build

* refine the code for android package

Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
Co-authored-by: Jamie Magee <jamie.magee@microsoft.com>
2022-10-04 16:22:28 -07:00
Wenbing Li a7f1a728d0
the doc for android/java custom build. (#260)
* the doc for android/java custom build.

* Update custom_build.md

* Update custom_build.md

* Update custom_build.md
2022-07-08 10:26:00 -07:00
Nat Kershaw (MSFT) f12f42a007
Update README.md (#238) 2022-07-06 16:18:35 -07:00
Mojimi abdd5b1bd8
Add MaskedFill (#182)
* add StringRemove

* update

Co-authored-by: Ze Tao <zetao@microsoft.com>
2021-11-04 09:29:17 +08:00
Mojimi 4290400ed3
Add doc for new operators (#161)
* add initial doc

* update doc

* finish all docs

Co-authored-by: Ze Tao <zetao@microsoft.com>
2021-09-29 07:59:09 +08:00
Wenbing Li 06c902253f
re-package onnx process code (#93)
* re-package onnx process code

* update the docs and examples as well.
2021-05-14 09:23:50 -07:00
Wenbing Li 3806e29421
rename the package to onnxruntime_extensions (#92)
* rename the package to onnxruntime_extensions

* fix the cmake file
2021-05-12 12:02:57 -07:00
Zuwei Zhao 794890985e
Support custom operator: StringToVector. (#84)
Co-authored-by: Zuwei Zhao <zuzhao@microsoft.com>
Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com>
2021-04-22 13:29:43 +08:00
Wenbing Li aa846c3116
Support the pre/post processing Python and pytorch code snippets to be converted and be merged into the ONNX model. (#76)
* initial checkins

* restructure the implementation.

* refine the Python interface

* Finalize the interface.

* Add the custmop class for the customization.

* Test the eager_op with vector_to_string customop

* Refine the customop conversion interface.

* initial onnx builder

* Runable with incorrect result.

* reformat the onnx_ops calls

* a few of operators working on tracing

* handcraft all op conversion

* Add the unit testing for mytorch

* unit test passed.

* Add some documents...

* Move non-torch API into onnxruntime_customops.utils module.

* Fix the unit test issues.

* Fix some typos.
2021-03-12 10:39:21 -08:00
Xavier Dupré 4bc5c962b0
Add WordpieceTokenizer (#72)
* add Wordpiece tokenizer
* add RaggedTensorToDense
* update documentation
2021-03-11 19:19:49 +01:00
Mojimi 9653f52341
Add batch query and attention mask support for GPT2Tokenizer (#75)
* add batch_mode and padding for GPT2Tokenizer

* fix text

* fix test and add doc

* fix test

* fix comments

* delete header

Co-authored-by: Ze Tao <zetao@microsoft.com>
Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com>
2021-03-10 13:57:07 -08:00
Mojimi 2378ca116b
add StringConcat (#70)
Co-authored-by: Ze Tao <zetao@microsoft.com>
2021-02-25 10:44:30 +08:00
Mojimi da41b75467
Add op: VectorToString (#57)
* add vector_to_string

* fix merge conflict

* fix building failure

* remove debug code

* fix test

* move back unicode

* fix typo

* move base64 back

* move the right place

* support only int64_t

Co-authored-by: Ze Tao <zetao@microsoft.com>
Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com>
2021-02-09 09:41:00 -08:00
Xavier Dupré b3a300d7bf
Add attribute global_replace to StringRegexReplace (#55)
* Add attribute global_replace to StringRegexReplace

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* fix potential wrong pointer

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* update sep

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

Co-authored-by: xavier dupré <xavier.dupre@gmail.com>
Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com>

> It seems to be working now.

I enabled some less secured option in pipeline. let's see how it goes.
2021-02-05 09:08:02 -08:00
Xavier Dupré 4c201e7800
Change Fix type of nbtest_size into int64 (#54)
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

Co-authored-by: xavier dupré <xavier.dupre@gmail.com>
2021-01-29 14:21:50 -05:00
Xavier Dupré a32f9bc28c
Documentation for SentencepieceTokenizer (#52) 2021-01-28 19:07:48 +01:00
Mojimi a9a498501c
Improve GPT2 (#48)
* test attribute

* finish improvement

Co-authored-by: Ze Tao <zetao@microsoft.com>
Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com>
2021-01-27 15:26:37 -08:00
Mojimi 4a0f892949
Operator Schemas of text processing ops (#42)
* add a schema doc for new Op
Co-authored-by: Ze Tao <zetao@microsoft.com>
2021-01-21 15:07:32 +08:00