Commit graph

55 commits

Author SHA1 Message Date
Guoyu Wang
a47a234b7e
Add minsdkver for AAR and AndroidTest (#7669) 2021-05-12 16:01:25 -07:00
Rachel Guo
d8cf960412
Add android test app to validate Java API for ORT-Mobile Android (#7477)
* test

* [gwang] make cmake compile work

* [gwang] enble build apks

* some build update

* add simple sigmoid test android project and cmake

* add build.py

* refine and remove unused import lib

* address CR comments

* remove unnecessary files

* add README.md

* minor update

* remove

* minor change

* fix ci failure and minor update

* fix typo in project folder

* remove

* remove and minor update

* refine

* minor fix

* fix

* fix typo

* add gradle spotlessApply task to fix CI failure

* fix

* enable spotlessApply in build gradle

* revert some changes

* minor fix

* run spotless apply for format

* address CR comments and fix CI version and format

* refine

* Refine

* address comments

* refine

* refine

* modify

* reformat

* resolve version conflicts

* minor update

* minor update

* address comments

* minor update

Co-authored-by: Guoyu Wang <wanggy@outlook.com>
2021-05-04 15:39:14 -07:00
Changming Sun
7b003967b1
Add static code analyzer to Windows CPU/GPU CI builds and fix the warnings (#7489) 2021-04-29 11:54:57 -07:00
Changming Sun
d68cedfa85
Fix some C/C++ warnings in the jni part (#7385) 2021-04-28 14:25:58 -07:00
Guoyu Wang
fce67e2b9b
Create Android Package pipeline (#7295)
* Create Android Package pipeline

* adress CR comments

* Switch to jdk11
2021-04-12 17:56:25 -07:00
Guoyu Wang
4969431eba
Fix codeql java warning (#7280) 2021-04-08 11:08:12 -07:00
Guoyu Wang
d500c5952b
Add Android AAR packaging script for ORT-Mobile (#7138)
* Add Android aar packaging script for ORT-Mobile

* Address CR comments
2021-03-30 18:42:18 -07:00
Denny Abraham Cheriyan
f2f60eed59
Fix broken Java API link (#6826) 2021-03-08 11:28:41 -08:00
Adam Pocock
5a473216b7
[Java] Adds extra providers (#6770)
Add providers for CoreML, ROCM, NNAPI, ArmNN
 Adding the structs for OrtCUDAProviderOptions and OrtOpenVINOProviderOptions
 Updating NNAPI flags.
 Adding the new CoreML flag.
 Adding hooks to the build system to tell Java about the new providers.
2021-02-24 10:25:05 -08:00
Nat Kershaw (MSFT)
c170061998
Removed BUILD.md from master as source now lives in gh-pages (#6709) 2021-02-19 11:34:21 -08:00
Adam Pocock
dbe31361bc Fix build.gradle so it always targets Java 8 class files. 2021-02-05 22:26:17 -08:00
Adam Pocock
77d0eb3f56
Fixing a leak in OnnxSequences with String keys or values. (#6473) 2021-01-28 11:28:56 -08:00
Adam Pocock
0100f336d7
[java] Adds support for OrtEnvironment thread pools (#6406)
* Updates for Gradle 7.

* Adding support for OrtThreadingOptions into the Java API.

* Fixing a typo in the JNI code.

* Adding a test for the environment's thread pool.

* Fix cuda test, add comment to failure.

* Updating build.gradle
2021-01-27 13:25:22 -08:00
Dmitri Smirnov
6d0fb3ebb3
Java: Set C language warnings to W4 and adjust JNI code (#6347)
Set /W3 for C language and fix up JNI warnings.
2021-01-14 15:04:47 -08:00
Adam Pocock
396074d2a8
Fixing OrtEnvironment.getEnvironment() so it doesn't print a warning if the environment already exists with a non-default name. (#5973) 2020-12-01 15:21:06 -08:00
Adam Pocock
fddbd8935c
Adding Java support for getAvailableProviders and other small methods (#5366)
* Adding Java support for getAvailableProviders, addFreeDimensionOverrideByName, disablePerSessionThreads and getProfilingStartTimeNs.

* Fixing copyright years, running spotless and adding javadoc and an accessor to OrtProvider.

* Renaming OrtSession.getProfilingStartTimeInNs.

* Removing ngraph as it's been deprecated.
2020-11-24 21:42:57 -08:00
Adam Pocock
8b83c51a35
[Java] Initial Apple Silicon support (#5891)
* Rearranging checks in onnxruntime_mlas.cmake to pickup Apple Silicon.

On an M1 Macbook Pro clang reports:

$ clang -dumpmachine
arm64-apple-darwin20.1.0

So the regex check needs to look for "arm64" first, as otherwise it
matches 32-bit ARM and you get NEON compilation failures.

* Adding Java side library loading support for Apple Silicon (and other aarch64 architectures).

* Adding Qgemm fix from @tracysh

* Fixes the java packaging on Windows.

* Missed a check in the java platform detector.
2020-11-24 15:51:40 -08:00
S. Manohar Karlapalem
ff58f621fa
Remove nGraph Execution Provider (#5858)
* Remove nGraph Execution Provider

Pursuant to nGraph deprecation notice: https://github.com/microsoft/onnxruntime/blob/master/docs/execution_providers/nGraph-ExecutionProvider.md#deprecation-notice

**Deprecation Notice**

| | |
| --- | --- |
| Deprecation Begins	| June 1, 2020 |
| Removal Date |	December 1, 2020 |

Starting with the OpenVINO™ toolkit 2020.2 release, all of the features
previously available through nGraph have been merged into the OpenVINO™
toolkit. As a result, all the features previously available through
ONNX RT Execution Provider for nGraph have been merged with ONNX RT
Execution Provider for OpenVINO™ toolkit.

Therefore, ONNX RT Execution Provider for **nGraph** will be deprecated
starting June 1, 2020 and will be completely removed on December 1,
2020. Users are recommended to migrate to the ONNX RT Execution Provider
for OpenVINO™ toolkit as the unified solution for all AI inferencing on
Intel® hardware.

* Remove nGraph Licence info from ThirdPartyNotices.txt

* Use simple Test.Run() for tests without EP exclusions

To be consistent with rest of test code.

* Remove nGraph EP functions from Java code
2020-11-19 16:47:55 -08:00
Guoyu Wang
261462be0d
Change NNAPI runtime options to use uint32_t (#5863)
* Change nnapi options unsigned long -> uint32_t

* Move options from long to int in java code
2020-11-19 13:38:49 -08:00
Adam Pocock
d1d82065b9
[Java] Fixes an error allocating large direct byte buffers during OnnxTensor creation (#5619)
* Fixing an error with allocating large direct byte buffers during tensor creation.

* Removing the redundant overflow check.
2020-11-05 15:02:41 -08:00
Guoyu Wang
a2b551ff08
Add runtime options for NNAPI EP (#5576)
* Add options for nnapi ep

* Add nnapi flags test

* add comments

* Add flag comments

* Make the flags bitset const

* Fix build break

* Add stub changes to java and c# api

* Fix java related build break

* Fix java build break

* Switch to bit flags instead of bitset
2020-11-04 10:08:43 -08:00
Rohith_Kvsp
50582abe93
Fix IS_ANDROID Issue (#5599)
Fixed static IS_ANDROID detection
  final static IS_ANDROID is causing an Error Unsupport arch:aarch64, so removed IS_ANDROID & replaced with   IS_ANDROID with isAndroid().
2020-10-28 14:42:33 -07:00
Guoyu Wang
6e4949e235
javadoc warning fix (#5332)
Co-authored-by: gwang0000 <62914304+gwang0000@users.noreply.github.com>
2020-10-02 11:52:07 -07:00
Adam Pocock
d26c71f55c
[java] Fixing the buffer semantics. (#5223)
* [java] Fixing the buffer semantics.
* Renaming bufferCapacity to bufferRemaining.
* Adding a cast to char* so the pointer arithmetic works on Windows.
2020-09-22 21:29:01 -07:00
Guoyu Wang
e30530d9ea
Add java API for AddSessionConfigEntry (#5241)
* Add session option config entry API for java

* Java format

* Add extra test verification

* Address PR comments

* Update comments

Co-authored-by: gwang0000 <62914304+gwang0000@users.noreply.github.com>
2020-09-22 14:51:39 -07:00
Xiang Zhang
0dad79b495
Add SetLanguageProjection C Api and use it in four projections (#5023)
* Add SetLanguageProjection C Api and use it in four projections

* static cast enum languageprojection to uint32_t

* resolve comments

* fix typo and line added unintentionally

* revert unecessary change

* reorder c# api

* add TensorAt and CreateAndRegisterAllocator in Csharp to keep the same order as C apis
2020-09-04 14:26:39 -07:00
gwang-msft
5651c23271
Fix for Android ORT android initOsArch exception (#5006) 2020-09-02 00:48:06 -07:00
James Yuzawa
aca34352a5
Java API: Documentation cleanup (#4395)
* update java API docs

* fix link

* rearrange

* update platforms, use table

* use javadoc.io

* craigacp tested it in java 14

* update link

* fix broken link

* fix testdata link
2020-08-13 12:06:42 -07:00
Dmitri Smirnov
af0750ba1b
Java GPu artifact naming (#4179)
Modify gradle build so artifactID has _gpu for GPU builds.
  Pass USE_CUDA flag on CUDA build
  Adjust publishing pipelines to extract POM from a correct path.

Co-Authored-By: @Craigacp
2020-06-10 11:15:48 -07:00
Changming Sun
2ab3a19728
Enlarge the read buffer size in C#/Java test code (#4150)
1. Enlarge the read buffer size further, so that our code can run even faster. TODO: need apply the similar changes to python some other language bindings.
2. Add coreml_VGG16_ImageNet to the test exclusion set of x86_32. It is not a new model but previously we didn't run the test against x86_32.
2020-06-08 16:13:11 -07:00
Dmitri Smirnov
6199ef1375 Change group id to com.microsoft.onnxruntime per requirements. 2020-06-03 22:30:13 -07:00
Dmitri Smirnov
afca0d15ee
Create Java publishing pipeline (#3944)
Create CPU and GPu Java publishing pipelines. Final jars are tested on all platforms. However, signing and publishing to maven are manual steps.
2020-06-01 18:18:57 -07:00
Paul Fultz II
7759136610
Add amd migraphx execution provider to onnx runtime (#2929)
* Add amd migraphx execution provider to onnx runtime

* rename MiGraphX to MIGraphX

* remove unnecessary changes in migraphx_execution_provider.cc

* add migraphx EP to tests

* add input requests of the batchnorm operator

* add to support an onnx operator PRelu

* update migrapx dockerfile and removed one unused line

* sync submodules with mater branch

* fixed a small bug

* fix various bugs to run msft real models correctly

* some code cleanup

* fix python file format

* fixed a code style issue

* add default provider for migraphx execution provider

Co-authored-by: Shucai Xiao <Shucai.Xiao@amd.com>
2020-05-27 04:24:59 +08:00
jji2019
dbd5aab6d2
Update OnnxRuntime.java for OS X environment. (#3985)
onnxruntime init failure due to wrong path of reading native libraries. In OS X 64 system, the arch name is detected as x86 which generates invalid path to read native libraries.

Exception java.lang.UnsatisfiedLinkError: no onnxruntime in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at ai.onnxruntime.OnnxRuntime.load(OnnxRuntime.java:174)
	at ai.onnxruntime.OnnxRuntime.init(OnnxRuntime.java:81)
	at ai.onnxruntime.OrtEnvironment.<clinit>(OrtEnvironment.java:24)
2020-05-20 09:15:03 -07:00
Faith Xu
b8a255e1b5
Doc Updates for Build (#3976)
* Initial update of readme

* Readme updates

* Review of consolidated README (#3930)

* Proposed updates for readme (#3953)

I found some of the information was duplicated within the doc, so attempted to streamline

* Fix links

* More updates

- fix build instructions
- nodejs doc reorganization
- roadmap update
- version fixes

* Update ORT Server build instructions

* More doc cleanup

* fix python dev notes name

* Update nodejs and some links

* sync eigen version back to master

* Minor fixes

* add nodsjs to sample table of content

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* address PR feedback

* address PR feedback

* nodejs build instruction

* Update Java instructions to include gradle

* Roadmap refresh

Reformat some data, fix link, minor rewording

* Clarify Visual C++ runtime req

Co-authored-by: Nat Kershaw (MSFT) <nakersha@microsoft.com>
Co-authored-by: Prasanth Pulavarthi <prasantp@microsoft.com>
Co-authored-by: manashgoswami <magoswam@microsoft.com>
2020-05-18 20:08:36 -07:00
Adam Pocock
9d2d1eb6f6
[java] Adds a CUDA test (#3956)
* [java] - adding a cuda enabled test.

* Adding --build_java to the windows gpu ci pipeline.

* Removing a stray line from the unit tests that always enabled CUDA for Java.
2020-05-18 12:05:51 -07:00
Dmitri Smirnov
18dc0ec39f
Rework jar by creating os-arch folders (#3849)
Detect os and arch and move the artifacts to a new folder.
 Remove unnecesary jars so we cam focus on those we publish.
 Add signing
 Make signature simlper.
 Fix indent.
 Halt on 32-bit arch.
 Credits: @Craigacp
2020-05-12 15:31:20 -07:00
Adam Pocock
d38b79c6e5
[Java] Adding missing methods on Session, SessionOptions and RunOptions (v2) (#3832)
* java - adding support for custom op libraries.

* Adding support for RunOptions and additional methods for SessionOptions and OrtSession.

As a result OrtEnvironment.LoggingLevel moved to be a top level enum
called OrtLoggingLevel.

* java - adding unit tests for RunOptions and SessionOptions.

* java - removing unused releaseNamesHandle method

* java - add test for custom op library.

* java - adding log verbosity methods, and tests for the same.

* java - fixes for custom op loading test on Windows.

* Cleanup after rebase on master.
2020-05-06 01:19:46 -07:00
Dmitri Smirnov
5db30a470e
[Java] Tidying up the sample MNIST code (#3824)
* Updating the Java sample to load MNIST in libsvm format.
* java - code formatting fix.
Co-authored-by: Adam Pocock <adam.pocock@oracle.com>
2020-05-05 14:34:13 -07:00
Dmitri Smirnov
111469728f
Make Java build and run tests on Windows the box (#3811)
Incorporate .DLL symbolic link names fix.
  Make unit tests run. Make gradle run on Windows.
2020-05-04 18:19:35 -07:00
Adam Pocock
3dd3f84116
[Java] Adding model metadata support (#3573)
* java - adding deployment information to build.gradle.

* java - adding support for model metadata.
2020-04-21 02:28:15 -07:00
Adam Pocock
c91527235a
[Java] Add support for map and sequence information on output nodes (#3468) 2020-04-16 02:29:23 -07:00
Adam Pocock
bc9a199b16 Renaming deviceNum to deviceId. 2020-04-14 20:35:03 -07:00
Adam Pocock
e9dc8954ac Adding support for ACL and DML to the Java API. 2020-04-14 20:35:03 -07:00
daquexian
37a905f557
Make Java API available on Android (#3030) 2020-02-27 08:23:50 -08:00
Adam Pocock
b23b7f0fea
[java] Adds the provider compile-time flags where the JNI code expects them. (#3082) 2020-02-24 15:47:26 -08:00
Adam Pocock
a7541f9753
[Java] Fix for incorrect input and output lengths in run call (#3064) 2020-02-21 13:13:02 -08:00
James Yuzawa
dde4df148b Add and run spotless formatter for Java and Gradle 2020-02-19 23:51:09 -08:00
James Yuzawa
411b3aa801
Java build system enhancements (#2866) 2020-02-18 15:41:49 -08:00
Adam Pocock
c23bd93ea5 The closed variable in OrtEnvironment should be volatile to ensure threads see changes to it. 2020-01-29 23:39:37 -08:00