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

118 Коммитов

Автор SHA1 Сообщение Дата
Wenbing Li c3379ecb6b
fix the build for mobile packaging (#843)
* fix the build for mobile packaging

* update the cmake file as well

* more fixing on dlib related ops

* release the iOS cmake version constraint

* upgrade cmake in Linux CUDA build

* Update Dockerfile.ubuntu_cuda11_8_tensorrt8_6 for typo

* Update ios_packaging.yml for Azure Pipelines

* update the dlib versoin

* update all cases of cmake version

* update the comment for dlb cmake
2024-11-17 20:09:36 -08:00
Wenbing Li be5aa773e3
Unify the image operations in extensions library (#831)
* Unify the image operations in extensions library

* fix the build configuration issue

* More build fixings

* Fix the native image codec

* fix encode_image

* Add bgr/rgb conversion for encoding image

* parity check

* build break

* update PNG encoding parameters

* build break on Linux

* using MSE to compare images

* fix the discrependency between Linux and Windows

* final code refinement

* one more change

* fix the C++ warnings

---------

Co-authored-by: Sayan Shaw <52221015+sayanshaw24@users.noreply.github.com>
2024-10-30 09:17:06 -07:00
Rony Fadel 8de0d6c8db
Change the framework bundle identifier to a valid one (#829)
Ref: https://github.com/microsoft/onnxruntime-extensions/issues/825

"com.microsoft.onnxruntime_extensions" is not a valid identifier. Update it to "com.microsoft.onnxruntime-extensions"
2024-10-21 10:56:41 -07:00
Wenbing Li e19c0894ec
Fix CUDA CI build failures (#824) 2024-10-11 16:08:44 -07:00
Chester Liu e424838708
Added support for native image decoding (#808)
This added support for native image decoding on Windows & Apple platforms.
This helps us remove libpng & libjpeg completely on these platforms, and
in the meantime support more image formats thanks to OS vendors,
2024-09-26 09:17:55 +08:00
Wenbing Li 6b94f4d7a5
Fix the Unicode code discrepency on CLIP model (#814)
* refine the code structure

* more fixing on unicode

* fix the codepoint 304

* add the clip tokenizer data files abck
2024-09-23 16:49:24 -07:00
Wenbing Li 176c1d0138
Support the Unigram tokenizer kind from sentencepiece library (#811)
* initial commit

* Ugm vocab loaded is good

* test passed

* fixes unit test on win32

* finish the parity check

* code refinement

* code refinement for review
2024-09-19 15:46:13 -07:00
Scott McKay 9164f54e5d
Don't disable vision operators in a catalyst build. (#805)
* Don't disable vision operators in a catalyst build.

* Patch to exclude NSImage on Mac-catalyst as it's not supported.
2024-09-10 08:58:09 +10:00
Wenbing Li 1b80794903
Remove OpenCV dependency from C_API mode (#800)
* Remove OpenCV dependency from C_API model

* fix build on Windows

* switch ci build flag

* try to fix the macOS build issue

* more fixing

* fix the macOS build issue

* list jpeg source

* verified on MacOS

* update the pp_api too

* avoid the codecs library conflicts

* Add the unit tests

* move the codec test

* add the missing dl lib for extensions test

* refine the code

* a smaller fixing for Windows Python
2024-09-04 16:50:05 -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 c9c11b4846
Fix the windows API missing issue and Linux shared library size issue for Java packaging. (#774)
* Fix the java packaging issues

* add the jar path example for Linux build with a default configuration
2024-07-29 16:03: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 38a3d85f8f
switch cmake cmp0169 flag to new (#762)
* switch cmake cmp0169 flag to new

* the missing spm code.

* more refinement on cmake build targets

* Update ci.yml

* Update ci.yml

* update the jpg files after using libjpeg instead of libjpeg-turbo

* exclude cutlass too

* upgrade the protobuf library to be consistent with ORT

* update the protoc generated files

* use the right patch name

* Update cutlass.cmake
2024-07-15 23:28:49 -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 3b275b16bc
Upgrade pybind11 2.12 to support both numpy 1.x and 2.x (#750) 2024-06-20 15:18:17 -07:00
Wenbing Li cbed8fd575
Add a generic image processor and its C API (#745)
* Add a generic image processor

* add more tests

* Fix the test failures

* Update runner.hpp
2024-06-20 10:53:49 -07:00
Wenbing Li 2f9595af74
Fix the pipeline breaks dues to the MSVC 19.40 and numpy 2.0 release (#747)
* dd "-allow-unsupported-compiler" flags to Windows CUDA flags

inspired by this PR: https://github.com/microsoft/onnxruntime/pull/21004

* switch to cmake command line

* handle the issues caused by the latest MSVC release

* correct the typo

* correct the parameter

* try one dash again

* use the installed cmake

* use cmake standalone installation firstly

* use the standalone cmake in win32 python too

* fix it more

* one more try

* fix the MacOS pipeline issue

* fix the pip command line
2024-06-17 16:58:11 -07:00
Wenbing Li ca433cbea7
Refactor the unit tests and cmake build script (#726)
* refine the build script

* complete the unit tests.

* remove the commented code
2024-05-30 14:16:14 -07:00
Scott McKay a1285d8f36
Fix CG warnings. (#731)
- update protobuf version being used by sentencepiece and the java tests
- ignore unused language bindings from protobuf and triton
- specify the CG config file with ignored directories where required

Fix cgmanifest.json
- 'git' entries require a commit hash not version
- use 'other' for opencv third party code that is included directly in the opencv repo
  - the path isn't a valid repositoryUrl value to be provided as a 'git' entry
- update version numbers/commit hashes to match the latest code

Co-authored-by: Sayan Shaw <52221015+sayanshaw24@users.noreply.github.com>
2024-05-29 07:47:55 +10:00
Wenbing Li 4781a9d1d8
Add ci pipeline for pre-processing API testing (#718)
* Add ci pipeline for pre-processing API testing

* update cmake for testing

* add test cases back

* add other two pipelines

* fix macos pipeline
2024-05-16 15:39:52 -07:00
Wenbing Li 311dd35401
Add ImageProcessor for Multimodel model Pre-processing (#715)
* only keep the image decoder from opencv

* initial build

* refine the code

* Add clear functions

* Update CMakeLists.txt

* Update opencv.cmake

* change the output type to float

* get the result

* align image-process with original Python

* move the LoadRawImages into library

* fix the calculation error

* fix the pipeline build issue

* fix the build breaks in ci pipeline

* support json configuration file and refactor the code.
2024-05-15 14:35:14 -07:00
cao lei e645cdab8d
Introduce flash attention and cutlass library (#708)
* refactor cuda ops, remove contrib folder

* introduce flash attention and cutlass

* resolve comments

---------

Co-authored-by: Lei Cao <leca@microsoft.com@onnxruntime-a10.bxgbzpva45kedp3rhbsbit4phb.jx.internal.cloudapp.net>
2024-05-05 22:52:28 -07:00
Wenbing Li a8bce4328b
Add the tokenizer C ABI (#693)
* initial checkins

* fix the selectedops build failures

* add the tokenization implementation

* update the windows DEF file for c abi in cmake file

* fix the build on linux

* fix some warnings and remove the unused code

* initial import of unit tests from tfmtok

* add streaming API support

* fix the merges loading issues

* complete export from tfmtok - needs input id fixing

* fix the unit test failures.

* fix all unit test failure

* refactor streaming code

* remove the unused code

---------

Co-authored-by: Sayan Shaw <sayanshaw@microsoft.com>
2024-04-29 16:45:49 -07:00
Wenbing Li f9290e8bac
Add a status class for future tokenizer API implementation (#690)
* Add a status class for future API implementation

* Update bpe_kernels.cc

* fix the ios package pipeline

* update mistral test model name
2024-04-18 21:12:14 -07:00
Wenbing Li 646462790b
Refactor the header file directory and integrate the eager tensor implementation (#689)
* refactor the header file in include folder

* fix the basic-token eager unit test case

* a more flexible way to handle string tensor shape.

* fix the unit test path issue

* remove the multi-inherits to avoid issue during pointer casting

* add api cmake build support

* undo some temporary changes

* code refinement

* fix variadic arg

* only expose the context for ort version >= 17

* fix a shape bug

* fix the cuda build issue

* change ifdef condition of GetAllocator

* finalize the ort c abi wrapper file name

* fix the iOS build break

* align gtest version with triton

* Update ext_apple_framework.cmake for iOS header files

---------

Co-authored-by: Cheng Tang <chenta@a100.crj0ad2y1kku1j4yxl4sj10o4e.gx.internal.cloudapp.net>
2024-04-17 12:58:19 -07:00
Rachel Guo fe8cd9ee8d
Add extensions catalyst support (#684)
* save work

* add flags to disable build that's currently not supported on macabi

* update

* update

* fix arg type

* update ext_test.cmake

* fix

* try add flags

* exclude ext_test

* add missing downloading steps

* nameing minor fix

* update ios version etc.

* fix

* minor fix

* minor fix

* clean up

* nuget package changes for catalyst extensions (#686)

Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>

* update to net7.0 and add help comments

---------

Co-authored-by: rachguo <rachguo@rachguos-Mac-mini.local>
Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>
2024-04-17 10:43:35 -07:00
Wenbing Li a96ed42beb
Update ext_java.cmake (#688) 2024-04-10 16:22:12 -07:00
cao lei 5aefc7e54d
pass CMAKE_CUDA_ARCHITECTURE from command line (#683) 2024-03-28 15:08:36 -07:00
Wenbing Li 5d558bd34f
Refine the cuda build support (#680) 2024-03-27 10:08:07 -07:00
Sayan Shaw 62bbcb59a2
Update ort version to 1.17.1 (#665)
* update ort version to 1.17.1

* revert python versions

* change python range to 3.8-3.12 and skip requirements install and python test for WindowsPython

* add conditions for WindowsPython for Python 3.12

* typo

---------

Co-authored-by: Sayan Shaw <sayanshaw@microsoft.com>
2024-03-04 15:02:41 -08:00
Wenbing Li 69a08ffb1d
Remove numpy dependency from its Python binary build (#657) 2024-02-21 09:54:17 -08:00
Rachel Guo fcee38ff68
Add macos platform suppport to onnxruntime-extensions-c pod (#622)
* Squashed commit of the following:

commit 0bd8a9bd49b2bddae3aa0e6c61406e3fb20e011d
Author: rachguo <rachguo@rachguos-Mac-mini.local>
Date:   Thu Dec 14 16:55:29 2023 -0800

    remove #Preview

commit ac2ecdc696d06d579594834a0ffcc01613bd3422
Author: rachguo <rachguo@rachguos-Mac-mini.local>
Date:   Thu Dec 14 15:29:36 2023 -0800

    fix podfile

commit 24bb619fb311f64e28fe3bc94c44912d261ec0bc
Author: rachguo <rachguo@rachguos-Mac-mini.local>
Date:   Thu Dec 14 15:27:57 2023 -0800

    use pre-release version pod now

commit 9e227da06fe29ba01aef1d39a40712fd5dfd9dfc
Author: rachguo <rachguo@rachguos-Mac-mini.local>
Date:   Thu Dec 14 14:09:41 2023 -0800

    update sed

commit 6b9651d4d540845af441bc6cf1d45e1561ec967e
Author: rachguo <rachguo@rachguos-Mac-mini.local>
Date:   Thu Dec 14 13:14:46 2023 -0800

    minor fix

commit 26472d072e2147cd5d92fd6e02dfa182722e109f
Author: rachguo <rachguo@rachguos-Mac-mini.local>
Date:   Thu Dec 14 12:08:42 2023 -0800

    fix pod arch path

commit ba0237e3dd83bed706060969f4bd206ede68fecf
Author: rachguo <rachguo@rachguos-Mac-mini.local>
Date:   Thu Dec 14 11:13:51 2023 -0800

    update yml files

commit 1d91e17743594c28d3030089afae2578daaff848
Author: rachguo <rachguo@rachguos-Mac-mini.local>
Date:   Thu Dec 14 10:25:24 2023 -0800

    add script to substitute podspec file source

commit 248effa32e08cf08c6268ba8ac81ce9bec2b940d
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Thu Dec 14 07:33:21 2023 -0800

    fix pod and update artifacts path

commit 7dfed33706f9e8772126eb78f551cc2110011e64
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Thu Dec 14 01:07:43 2023 -0800

    update

commit 834b03fa69faebc2c7cd948287f870a3f83304a6
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Thu Dec 14 00:07:04 2023 -0800

    update directory name

commit ac46342bb65d4b670b90c4685d6b0d47273edeb5
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Wed Dec 13 23:17:28 2023 -0800

    format

commit 1a10611b28e16cf05e9c91b19eff600e401dde84
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Wed Dec 13 23:16:24 2023 -0800

    copyrights comments and fix .yml format

commit 431682ef154ab93e68a6d099e0604d3a0d7fd804
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Wed Dec 13 23:05:39 2023 -0800

    add macos testing target in the app and testing ci updates

commit dcd0f302b3f0101584a16b91ef5a81559b22cb5a
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Wed Dec 13 14:17:28 2023 -0800

    update opencv.cmake again

commit 28b083c5d39fa743101b30e513f28bef7a82f24b
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Wed Dec 13 11:59:59 2023 -0800

    minor fix

commit d80acdad8583217ec06013f270732df2d8db62b5
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Wed Dec 13 11:26:49 2023 -0800

    add zlib to build from source option and minor update

commit dfd37effec13806ce30ddc5ed76dacefdfbc13f2
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Tue Dec 12 19:48:40 2023 -0800

    update podspec.template file

commit b227c2c196216aef6a05ba58254dedd1bcdcac60
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Tue Dec 12 19:26:40 2023 -0800

    comment out lint pod for now

commit d4bd488006e9d0b25ee01cb7c8447ec2bda620bd
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Tue Dec 12 18:46:38 2023 -0800

    fix podspec.template

commit a477470a3e63b5dd1966d8a943696df887859dd8
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Tue Dec 12 15:45:04 2023 -0800

    minor update

commit a07299decdfc10e7c2e96bd77ee49f97afbe5bd4
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Tue Dec 12 11:28:51 2023 -0800

    clean

commit a83642fbe309bd3c23f93c7aa00801f37cd8a0a3
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Tue Dec 12 11:26:50 2023 -0800

    fix merging framework_info.json process

commit 02980feff9a28a3099906c66a11df1f1d1ecf071
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Tue Dec 12 10:22:42 2023 -0800

    add step for checking the framework_info.json file contents

commit ee224e9e5948a6484dff8378697a71cae07e0801
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Tue Dec 12 09:35:32 2023 -0800

    update to xcframework_info.json

commit 96e13627c2f3c9802d90dd5afe4d96b69d76e012
Author: rachguo <rachguo@rachguos-Mini.attlocal.net>
Date:   Tue Dec 12 01:06:36 2023 -0800

    add changes for macosx build for extensions pod

* address pr comments

* add back supported archs

* update build.py

* reorganize source code avoid duplicates

* add minor note

* exclude macos for ci.yml

* update ci.yml

* address pr comments

* update

* update

* Update tools/ios/assemble_pod_package.py

Co-authored-by: Scott McKay <skottmckay@gmail.com>

---------

Co-authored-by: rachguo <rachguo@rachguos-Mac-mini.local>
Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>
Co-authored-by: Scott McKay <skottmckay@gmail.com>
2023-12-19 18:26:12 -08:00
Wenbing Li a761fc59b7
Some security warning fixings. (#611) 2023-11-29 13:17:50 -08:00
Yi Zhang 905b57462a
Make ort extensions build successfully on Linux GPU (#609)
* Make extensions compilable on Linux GPU

* target_link_directories
2023-11-23 09:05:12 +08:00
RandySheriffH b82630bead
Make first cuda op build with cuda context (#603)
* build first cuda kernel

* redirect to gpu pkg

* setup resource enum and version

* recover cuh

---------

Co-authored-by: Randy Shuai <rashuai@microsoft.com>
2023-11-14 09:49:26 -08:00
Wenbing Li 31d2f64786
upgrade the default ORT lib to 1.16.1 (#592)
* upgrade the default ORT lib to 1.16.1

* update the badge
2023-11-07 13:51:10 -08:00
Wenbing Li a0c2625511
Add CUDA build support and some code refinements (#581)
* the cuda kernel first example

* Update test_ortops.cc

* revert some unneccesary changes

* unix-like os build failure

* refactor header files

* fix python dll exporting error.
2023-10-30 21:06:30 -07:00
Edward Chen 8b00b409ba
Enable C++ unit tests on iOS (#560)
Add infrastructure for running GoogleTest tests on iOS.
Refactor build scripts.
2023-09-18 18:52:30 -05:00
Wenbing Li 914509d524
Enable the status returnable APIs from ORT 1.16 C ABI (#558)
* Initial checkins for returnable ORT ABIs

* fix for linux build

* more fixes on Python, test...

* remove the statusmsg

* native unit tests fixing

* Python unit tests fixing

* last unit test fixing
2023-09-13 14:59:09 -07:00
Wenbing Li 5f5687ce4a
Exclude some build targets to avoid the failure in Official pipeline. (#549)
* Exclude some build targets to avoid the failure in Official pipeline.

* Update onebranch-windows-build-stage.yml
2023-08-30 10:19:56 -07:00
Scott McKay 613c5c0c9d
Make Azure ops work on Android (#532)
* Use in-memory certs for curl on Android
  - could not get curl+openssl to be able to use the system ones
* Use static build for curl and openssl
  - smaller binary size

* Cache the x509 certificate store so we don't need to re-create for every request.
* Read certs from node attribute for now.

---------

Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com>
2023-08-23 12:34:40 +10: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
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
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 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
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 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