Class OrtTensorRTProviderOptions
java.lang.Object
smile.onnx.foreign.OrtTensorRTProviderOptions
struct OrtTensorRTProviderOptions {
int device_id;
int has_user_compute_stream;
void *user_compute_stream;
int trt_max_partition_iterations;
int trt_min_subgraph_size;
size_t trt_max_workspace_size;
int trt_fp16_enable;
int trt_int8_enable;
const char *trt_int8_calibration_table_name;
int trt_int8_use_native_calibration_table;
int trt_dla_enable;
int trt_dla_core;
int trt_dump_subgraphs;
int trt_engine_cache_enable;
const char *trt_engine_cache_path;
int trt_engine_decryption_enable;
const char *trt_engine_decryption_lib_path;
int trt_force_sequential_engine_build;
}
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegmentallocate(SegmentAllocator allocator) Allocate a segment of sizelayout().byteSize()usingallocatorstatic MemorySegmentallocateArray(long elementCount, SegmentAllocator allocator) Allocate an array of sizeelementCountusingallocator.static MemorySegmentasSlice(MemorySegment array, long index) Obtains a slice ofarrayParamwhich selects the array element atindex.static intdevice_id(MemorySegment struct) Getter for field:int device_idstatic voiddevice_id(MemorySegment struct, int fieldValue) Setter for field:int device_idstatic final ValueLayout.OfIntLayout for field:int device_idstatic final longOffset for field:int device_idstatic inthas_user_compute_stream(MemorySegment struct) Getter for field:int has_user_compute_streamstatic voidhas_user_compute_stream(MemorySegment struct, int fieldValue) Setter for field:int has_user_compute_streamstatic final ValueLayout.OfIntLayout for field:int has_user_compute_streamstatic final longOffset for field:int has_user_compute_streamstatic final GroupLayoutlayout()The layout of this structstatic MemorySegmentreinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static MemorySegmentreinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static longsizeof()The size (in bytes) of this structstatic inttrt_dla_core(MemorySegment struct) Getter for field:int trt_dla_corestatic voidtrt_dla_core(MemorySegment struct, int fieldValue) Setter for field:int trt_dla_corestatic final ValueLayout.OfIntLayout for field:int trt_dla_corestatic final longOffset for field:int trt_dla_corestatic inttrt_dla_enable(MemorySegment struct) Getter for field:int trt_dla_enablestatic voidtrt_dla_enable(MemorySegment struct, int fieldValue) Setter for field:int trt_dla_enablestatic final ValueLayout.OfIntLayout for field:int trt_dla_enablestatic final longOffset for field:int trt_dla_enablestatic inttrt_dump_subgraphs(MemorySegment struct) Getter for field:int trt_dump_subgraphsstatic voidtrt_dump_subgraphs(MemorySegment struct, int fieldValue) Setter for field:int trt_dump_subgraphsstatic final ValueLayout.OfIntLayout for field:int trt_dump_subgraphsstatic final longOffset for field:int trt_dump_subgraphsstatic inttrt_engine_cache_enable(MemorySegment struct) Getter for field:int trt_engine_cache_enablestatic voidtrt_engine_cache_enable(MemorySegment struct, int fieldValue) Setter for field:int trt_engine_cache_enablestatic final ValueLayout.OfIntLayout for field:int trt_engine_cache_enablestatic final longOffset for field:int trt_engine_cache_enablestatic MemorySegmenttrt_engine_cache_path(MemorySegment struct) Getter for field:const char *trt_engine_cache_pathstatic voidtrt_engine_cache_path(MemorySegment struct, MemorySegment fieldValue) Setter for field:const char *trt_engine_cache_pathstatic final AddressLayoutLayout for field:const char *trt_engine_cache_pathstatic final longOffset for field:const char *trt_engine_cache_pathstatic intGetter for field:int trt_engine_decryption_enablestatic voidtrt_engine_decryption_enable(MemorySegment struct, int fieldValue) Setter for field:int trt_engine_decryption_enablestatic final ValueLayout.OfIntLayout for field:int trt_engine_decryption_enablestatic final longOffset for field:int trt_engine_decryption_enablestatic MemorySegmentGetter for field:const char *trt_engine_decryption_lib_pathstatic voidtrt_engine_decryption_lib_path(MemorySegment struct, MemorySegment fieldValue) Setter for field:const char *trt_engine_decryption_lib_pathstatic final AddressLayoutLayout for field:const char *trt_engine_decryption_lib_pathstatic final longOffset for field:const char *trt_engine_decryption_lib_pathstatic intGetter for field:int trt_force_sequential_engine_buildstatic voidtrt_force_sequential_engine_build(MemorySegment struct, int fieldValue) Setter for field:int trt_force_sequential_engine_buildstatic final ValueLayout.OfIntLayout for field:int trt_force_sequential_engine_buildstatic final longOffset for field:int trt_force_sequential_engine_buildstatic inttrt_fp16_enable(MemorySegment struct) Getter for field:int trt_fp16_enablestatic voidtrt_fp16_enable(MemorySegment struct, int fieldValue) Setter for field:int trt_fp16_enablestatic final ValueLayout.OfIntLayout for field:int trt_fp16_enablestatic final longOffset for field:int trt_fp16_enablestatic MemorySegmentGetter for field:const char *trt_int8_calibration_table_namestatic voidtrt_int8_calibration_table_name(MemorySegment struct, MemorySegment fieldValue) Setter for field:const char *trt_int8_calibration_table_namestatic final AddressLayoutLayout for field:const char *trt_int8_calibration_table_namestatic final longOffset for field:const char *trt_int8_calibration_table_namestatic inttrt_int8_enable(MemorySegment struct) Getter for field:int trt_int8_enablestatic voidtrt_int8_enable(MemorySegment struct, int fieldValue) Setter for field:int trt_int8_enablestatic final ValueLayout.OfIntLayout for field:int trt_int8_enablestatic final longOffset for field:int trt_int8_enablestatic intGetter for field:int trt_int8_use_native_calibration_tablestatic voidtrt_int8_use_native_calibration_table(MemorySegment struct, int fieldValue) Setter for field:int trt_int8_use_native_calibration_tablestatic final ValueLayout.OfIntLayout for field:int trt_int8_use_native_calibration_tablestatic final longOffset for field:int trt_int8_use_native_calibration_tablestatic intGetter for field:int trt_max_partition_iterationsstatic voidtrt_max_partition_iterations(MemorySegment struct, int fieldValue) Setter for field:int trt_max_partition_iterationsstatic final ValueLayout.OfIntLayout for field:int trt_max_partition_iterationsstatic final longOffset for field:int trt_max_partition_iterationsstatic longtrt_max_workspace_size(MemorySegment struct) Getter for field:size_t trt_max_workspace_sizestatic voidtrt_max_workspace_size(MemorySegment struct, long fieldValue) Setter for field:size_t trt_max_workspace_sizestatic final ValueLayout.OfLongLayout for field:size_t trt_max_workspace_sizestatic final longOffset for field:size_t trt_max_workspace_sizestatic inttrt_min_subgraph_size(MemorySegment struct) Getter for field:int trt_min_subgraph_sizestatic voidtrt_min_subgraph_size(MemorySegment struct, int fieldValue) Setter for field:int trt_min_subgraph_sizestatic final ValueLayout.OfIntLayout for field:int trt_min_subgraph_sizestatic final longOffset for field:int trt_min_subgraph_sizestatic MemorySegmentuser_compute_stream(MemorySegment struct) Getter for field:void *user_compute_streamstatic voiduser_compute_stream(MemorySegment struct, MemorySegment fieldValue) Setter for field:void *user_compute_streamstatic final AddressLayoutLayout for field:void *user_compute_streamstatic final longOffset for field:void *user_compute_stream
-
Method Details
-
layout
The layout of this struct -
device_id$layout
Layout for field:int device_id -
device_id$offset
public static final long device_id$offset()Offset for field:int device_id -
device_id
Getter for field:int device_id -
device_id
Setter for field:int device_id -
has_user_compute_stream$layout
Layout for field:int has_user_compute_stream -
has_user_compute_stream$offset
public static final long has_user_compute_stream$offset()Offset for field:int has_user_compute_stream -
has_user_compute_stream
Getter for field:int has_user_compute_stream -
has_user_compute_stream
Setter for field:int has_user_compute_stream -
user_compute_stream$layout
Layout for field:void *user_compute_stream -
user_compute_stream$offset
public static final long user_compute_stream$offset()Offset for field:void *user_compute_stream -
user_compute_stream
Getter for field:void *user_compute_stream -
user_compute_stream
Setter for field:void *user_compute_stream -
trt_max_partition_iterations$layout
Layout for field:int trt_max_partition_iterations -
trt_max_partition_iterations$offset
public static final long trt_max_partition_iterations$offset()Offset for field:int trt_max_partition_iterations -
trt_max_partition_iterations
Getter for field:int trt_max_partition_iterations -
trt_max_partition_iterations
Setter for field:int trt_max_partition_iterations -
trt_min_subgraph_size$layout
Layout for field:int trt_min_subgraph_size -
trt_min_subgraph_size$offset
public static final long trt_min_subgraph_size$offset()Offset for field:int trt_min_subgraph_size -
trt_min_subgraph_size
Getter for field:int trt_min_subgraph_size -
trt_min_subgraph_size
Setter for field:int trt_min_subgraph_size -
trt_max_workspace_size$layout
Layout for field:size_t trt_max_workspace_size -
trt_max_workspace_size$offset
public static final long trt_max_workspace_size$offset()Offset for field:size_t trt_max_workspace_size -
trt_max_workspace_size
Getter for field:size_t trt_max_workspace_size -
trt_max_workspace_size
Setter for field:size_t trt_max_workspace_size -
trt_fp16_enable$layout
Layout for field:int trt_fp16_enable -
trt_fp16_enable$offset
public static final long trt_fp16_enable$offset()Offset for field:int trt_fp16_enable -
trt_fp16_enable
Getter for field:int trt_fp16_enable -
trt_fp16_enable
Setter for field:int trt_fp16_enable -
trt_int8_enable$layout
Layout for field:int trt_int8_enable -
trt_int8_enable$offset
public static final long trt_int8_enable$offset()Offset for field:int trt_int8_enable -
trt_int8_enable
Getter for field:int trt_int8_enable -
trt_int8_enable
Setter for field:int trt_int8_enable -
trt_int8_calibration_table_name$layout
Layout for field:const char *trt_int8_calibration_table_name -
trt_int8_calibration_table_name$offset
public static final long trt_int8_calibration_table_name$offset()Offset for field:const char *trt_int8_calibration_table_name -
trt_int8_calibration_table_name
Getter for field:const char *trt_int8_calibration_table_name -
trt_int8_calibration_table_name
Setter for field:const char *trt_int8_calibration_table_name -
trt_int8_use_native_calibration_table$layout
Layout for field:int trt_int8_use_native_calibration_table -
trt_int8_use_native_calibration_table$offset
public static final long trt_int8_use_native_calibration_table$offset()Offset for field:int trt_int8_use_native_calibration_table -
trt_int8_use_native_calibration_table
Getter for field:int trt_int8_use_native_calibration_table -
trt_int8_use_native_calibration_table
Setter for field:int trt_int8_use_native_calibration_table -
trt_dla_enable$layout
Layout for field:int trt_dla_enable -
trt_dla_enable$offset
public static final long trt_dla_enable$offset()Offset for field:int trt_dla_enable -
trt_dla_enable
Getter for field:int trt_dla_enable -
trt_dla_enable
Setter for field:int trt_dla_enable -
trt_dla_core$layout
Layout for field:int trt_dla_core -
trt_dla_core$offset
public static final long trt_dla_core$offset()Offset for field:int trt_dla_core -
trt_dla_core
Getter for field:int trt_dla_core -
trt_dla_core
Setter for field:int trt_dla_core -
trt_dump_subgraphs$layout
Layout for field:int trt_dump_subgraphs -
trt_dump_subgraphs$offset
public static final long trt_dump_subgraphs$offset()Offset for field:int trt_dump_subgraphs -
trt_dump_subgraphs
Getter for field:int trt_dump_subgraphs -
trt_dump_subgraphs
Setter for field:int trt_dump_subgraphs -
trt_engine_cache_enable$layout
Layout for field:int trt_engine_cache_enable -
trt_engine_cache_enable$offset
public static final long trt_engine_cache_enable$offset()Offset for field:int trt_engine_cache_enable -
trt_engine_cache_enable
Getter for field:int trt_engine_cache_enable -
trt_engine_cache_enable
Setter for field:int trt_engine_cache_enable -
trt_engine_cache_path$layout
Layout for field:const char *trt_engine_cache_path -
trt_engine_cache_path$offset
public static final long trt_engine_cache_path$offset()Offset for field:const char *trt_engine_cache_path -
trt_engine_cache_path
Getter for field:const char *trt_engine_cache_path -
trt_engine_cache_path
Setter for field:const char *trt_engine_cache_path -
trt_engine_decryption_enable$layout
Layout for field:int trt_engine_decryption_enable -
trt_engine_decryption_enable$offset
public static final long trt_engine_decryption_enable$offset()Offset for field:int trt_engine_decryption_enable -
trt_engine_decryption_enable
Getter for field:int trt_engine_decryption_enable -
trt_engine_decryption_enable
Setter for field:int trt_engine_decryption_enable -
trt_engine_decryption_lib_path$layout
Layout for field:const char *trt_engine_decryption_lib_path -
trt_engine_decryption_lib_path$offset
public static final long trt_engine_decryption_lib_path$offset()Offset for field:const char *trt_engine_decryption_lib_path -
trt_engine_decryption_lib_path
Getter for field:const char *trt_engine_decryption_lib_path -
trt_engine_decryption_lib_path
Setter for field:const char *trt_engine_decryption_lib_path -
trt_force_sequential_engine_build$layout
Layout for field:int trt_force_sequential_engine_build -
trt_force_sequential_engine_build$offset
public static final long trt_force_sequential_engine_build$offset()Offset for field:int trt_force_sequential_engine_build -
trt_force_sequential_engine_build
Getter for field:int trt_force_sequential_engine_build -
trt_force_sequential_engine_build
Setter for field:int trt_force_sequential_engine_build -
asSlice
Obtains a slice ofarrayParamwhich selects the array element atindex. The returned segment has addressarrayParam.address() + index * layout().byteSize() -
sizeof
public static long sizeof()The size (in bytes) of this struct -
allocate
Allocate a segment of sizelayout().byteSize()usingallocator -
allocateArray
Allocate an array of sizeelementCountusingallocator. The returned segment has sizeelementCount * layout().byteSize(). -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizelayout().byteSize() -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizeelementCount * layout().byteSize()
-