Skip to content

Commit

Permalink
Merge pull request #92 from yuzawa-san/ort/1.14.0
Browse files Browse the repository at this point in the history
Bump to onnxruntime v1.14.0
  • Loading branch information
yuzawa-san authored Feb 22, 2023
2 parents 1a549e6 + 1f1e31f commit ccac5af
Show file tree
Hide file tree
Showing 25 changed files with 1,441 additions and 173 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version=1.0.1-SNAPSHOT
com.jyuzawa.onnxruntime.library_version=1.13.1
com.jyuzawa.onnxruntime.library_version=1.14.0
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.jvmargs=--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ final void appendToSessionOptions(MemorySession memorySession, ApiImpl api, Memo
copyByte("enable_vpu_fast_compile", config, OrtOpenVINOProviderOptions::enable_vpu_fast_compile$set);
copyString("device_id", config, memorySession, OrtOpenVINOProviderOptions::device_id$set);
copyLong("num_of_threads", config, OrtOpenVINOProviderOptions::num_of_threads$set);
copyByte("use_compiled_network", config, OrtOpenVINOProviderOptions::use_compiled_network$set);
copyString("blob_dump_path", config, memorySession, OrtOpenVINOProviderOptions::blob_dump_path$set);
copyString("cache_dir", config, memorySession, OrtOpenVINOProviderOptions::cache_dir$set);
// TODO: context
copyByte("enable_opencl_throttling", config, OrtOpenVINOProviderOptions::enable_opencl_throttling$set);
copyByte("enable_dynamic_shapes", config, OrtOpenVINOProviderOptions::enable_dynamic_shapes$set);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ final void appendToSessionOptions(MemorySession memorySession, ApiImpl api, Memo
copyInteger("has_user_compute_stream", config, OrtROCMProviderOptions::has_user_compute_stream$set);
// TODO: user_compute_stream
// TODO: default_memory_arena_cfg
copyInteger("tunable_op_enabled", config, OrtROCMProviderOptions::tunable_op_enabled$set);
api.checkStatus(api.SessionOptionsAppendExecutionProvider_ROCM.apply(sessionOptions, config.address()));
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 James Yuzawa (https://www.jyuzawa.com/)
* Copyright (c) 2023 James Yuzawa (https://www.jyuzawa.com/)
* SPDX-License-Identifier: MIT
*/
package com.jyuzawa.onnxruntime_extern;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 James Yuzawa (https://www.jyuzawa.com/)
* Copyright (c) 2023 James Yuzawa (https://www.jyuzawa.com/)
* SPDX-License-Identifier: MIT
*/
package com.jyuzawa.onnxruntime_extern;
Expand Down
897 changes: 895 additions & 2 deletions src/main/java/com/jyuzawa/onnxruntime_extern/OrtApi.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 James Yuzawa (https://www.jyuzawa.com/)
* Copyright (c) 2023 James Yuzawa (https://www.jyuzawa.com/)
* SPDX-License-Identifier: MIT
*/
package com.jyuzawa.onnxruntime_extern;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 James Yuzawa (https://www.jyuzawa.com/)
* Copyright (c) 2023 James Yuzawa (https://www.jyuzawa.com/)
* SPDX-License-Identifier: MIT
*/
package com.jyuzawa.onnxruntime_extern;
Expand All @@ -20,7 +20,9 @@ public class OrtCUDAProviderOptions {
Constants$root.C_INT$LAYOUT.withName("has_user_compute_stream"),
MemoryLayout.paddingLayout(32),
Constants$root.C_POINTER$LAYOUT.withName("user_compute_stream"),
Constants$root.C_POINTER$LAYOUT.withName("default_memory_arena_cfg"))
Constants$root.C_POINTER$LAYOUT.withName("default_memory_arena_cfg"),
Constants$root.C_INT$LAYOUT.withName("tunable_op_enabled"),
MemoryLayout.paddingLayout(32))
.withName("OrtCUDAProviderOptions");

public static MemoryLayout $LAYOUT() {
Expand Down Expand Up @@ -212,6 +214,29 @@ public class OrtCUDAProviderOptions {
OrtCUDAProviderOptions.default_memory_arena_cfg$VH.set(seg.asSlice(index * sizeof()), x);
}

static final VarHandle tunable_op_enabled$VH =
$struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("tunable_op_enabled"));

public static VarHandle tunable_op_enabled$VH() {
return OrtCUDAProviderOptions.tunable_op_enabled$VH;
}

public static int tunable_op_enabled$get(MemorySegment seg) {
return (int) OrtCUDAProviderOptions.tunable_op_enabled$VH.get(seg);
}

public static void tunable_op_enabled$set(MemorySegment seg, int x) {
OrtCUDAProviderOptions.tunable_op_enabled$VH.set(seg, x);
}

public static int tunable_op_enabled$get(MemorySegment seg, long index) {
return (int) OrtCUDAProviderOptions.tunable_op_enabled$VH.get(seg.asSlice(index * sizeof()));
}

public static void tunable_op_enabled$set(MemorySegment seg, long index, int x) {
OrtCUDAProviderOptions.tunable_op_enabled$VH.set(seg.asSlice(index * sizeof()), x);
}

public static long sizeof() {
return $LAYOUT().byteSize();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 James Yuzawa (https://www.jyuzawa.com/)
* Copyright (c) 2023 James Yuzawa (https://www.jyuzawa.com/)
* SPDX-License-Identifier: MIT
*/
package com.jyuzawa.onnxruntime_extern;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 James Yuzawa (https://www.jyuzawa.com/)
* Copyright (c) 2023 James Yuzawa (https://www.jyuzawa.com/)
* SPDX-License-Identifier: MIT
*/
package com.jyuzawa.onnxruntime_extern;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 James Yuzawa (https://www.jyuzawa.com/)
* Copyright (c) 2023 James Yuzawa (https://www.jyuzawa.com/)
* SPDX-License-Identifier: MIT
*/
package com.jyuzawa.onnxruntime_extern;
Expand Down
Loading

0 comments on commit ccac5af

Please sign in to comment.