Package ai.djl.engine.rust
Class RustLibrary
java.lang.Object
ai.djl.engine.rust.RustLibrary
Rust native library.
-
Method Summary
Modifier and TypeMethodDescriptionstatic longabs(long handle) static longacos(long handle) static longadaptiveAvgPool(long handle, long[] shape) static longadaptiveMaxPool(long handle, long[] shape) static longadd(long handle, long other) static longstatic longargMax(long handle) static longargMaxWithAxis(long handle, int axis, boolean keepDims) static longargMin(long handle) static longargMinWithAxis(long handle, int axis, boolean keepDims) static longargSort(long handle, int axis, boolean ascending) static longasin(long handle) static longatan(long handle) static longatan2(long handle, long other) static longavgPool2d(long handle, long[] kernelShape, long[] stride) static longbatchMatMul(long handle, long other) static longbooleanMask(long handle, long indexHandle, int axis) static longbroadcast(long handle, long[] shape) static longceil(long handle) static longclip(long handle, double min, double max) static longcomplex(long handle) static longconcat(long[] srcArray, int axis) static booleancontentEqual(long handle, long other) static longcos(long handle) static longcosh(long handle) static longcountNonzero(long handle) static longcountNonzeroWithAxis(long handle, int axis) static longcumProd(long handle, int axis) static longcumProdWithAxis(long handle, int axis, boolean keepDims) static longcumProdWithType(long handle, int axis, int dataType) static longcumSum(long handle, int axis) static longdeleteModel(long handle) static voiddeleteTensor(long handle) static longdiv(long handle, long other) static longdot(long handle, long other) static longduplicate(long handle) static longelu(long handle, float alpha) static longeq(long handle, long other) static longerf(long handle) static longerfinv(long handle) static longexp(long handle) static longexpandDims(long handle, int axis) static longstatic longflatten(long handle) static longflattenWithDims(long handle, int startDim, int endDim) static longflip(long handle, int[] axes) static longfloor(long handle) static longstatic longfullSlice(long handle, long[] min, long[] max, long[] step) static longgather(long handle, long indexHandle, int axis) static longgelu(long handle) static intgetDataType(long handle) static int[]getDevice(long handle) static String[]getInputNames(long handle) static long[]getShape(long handle) static longgt(long handle, long other) static longgte(long handle, long other) static longhannWindow(long numPoints, String deviceType, int deviceId) static longinverse(long handle) static booleanstatic longisInf(long handle) static longisNaN(long handle) static longleakyRelu(long handle, float alpha) static longstatic longstatic longlog(long handle) static longlog10(long handle) static longlog2(long handle) static longlogicalAnd(long handle, long other) static longlogicalNot(long handle) static longlogicalOr(long handle, long other) static longlogicalXor(long handle, long other) static longlogSoftmax(long handle, int axis) static longlpPool(long handle, float normType, long[] kernelShape, long[] stride, boolean ceilMode) static longlt(long handle, long other) static longlte(long handle, long other) static longmatmul(long handle, long other) static longmax(long handle) static longmaximum(long handle, long other) static longmaxPool(long handle, long[] kernelShape, long[] stride, long[] padding, boolean ceilMode) static longmaxWithAxis(long handle, int axis, boolean keepDims) static longmean(long handle) static longmeanWithAxis(long handle, int[] axis, boolean keepDims) static long[]median(long handle, int axis, boolean keepDims) static longmin(long handle) static longminimum(long handle, long other) static longminWithAxis(long handle, int axis, boolean keepDims) static longmul(long handle, long other) static longneg(long handle) static longneq(long handle, long other) static longnonZero(long handle) static longnorm(long handle, int i, int[] ints, boolean keepDims) static longnormalize(long handle, double p, long dim, double eps) static longoneHot(long handle, int depth, float onValue, float offValue, int dataType) static longstatic longpercentile(long handle) static longpercentileWithAxes(long handle, double percentile, int[] axes) static longpermute(long handle, int[] axes) static longpick(long handle, long pickHandle, int axis) static longpow(long handle, long other) static longprod(long handle) static longput(long handle, long indexHandle, long valueHandle) static longstatic longrandomNormal(float loc, float scale, long[] shape, int dataType, String deviceType, int deviceId) static longrandomPermutation(long n, String deviceType, int deviceId) static longreal(long handle) static longrelu(long handle) static longremainder(long handle, long other) static longrepeat(long handle, long repeat, int axis) static longreshape(long handle, long[] shape) static longrot90(long handle, int times, int[] axes) static longround(long handle) static longrunInference(long handle, long[] inputHandles) static longscatter(long handle, long indexHandle, long valueHandle, int axis) static longselu(long handle) static longsigmoid(long handle) static longsign(long handle) static longsin(long handle) static longsinh(long handle) static longsoftmax(long handle, int axis) static longsoftPlus(long handle) static longsoftSign(long handle) static longsort(long handle, int axis, boolean ascending) static long[]split(long handle, long[] indices, int axis) static longsqrt(long handle) static longsquare(long handle) static longsqueeze(long handle, int[] axes) static longstack(long[] srcArray, int axis) static longsub(long handle, long other) static longsum(long handle) static longsumWithAxis(long handle, int[] axes, boolean keepDims) static longtake(long handle, long indexHandle) static longtan(long handle) static longtanh(long handle) static longtensorOf(ByteBuffer buf, long[] shape, int dataType, String deviceType, int deviceId) static longtile(long handle, long[] repeats) static longtileWithAxis(long handle, int axis, long repeat) static longtileWithShape(long handle, long[] shape) static longtoBoolean(long handle) static byte[]toByteArray(long handle) static longtoDataType(long handle, int dataType) static longstatic long[]topK(long handle, int k, int axis, boolean largest, boolean sorted) static longtranspose(long handle, int axis1, int axis2) static longtrunc(long handle) static longstatic longwhere(long conditionHandle, long handle, long otherHandle) static longxlogy(long handle, long other) static long
-
Method Details
-
isCudaAvailable
public static boolean isCudaAvailable() -
loadModel
-
deleteModel
public static long deleteModel(long handle) -
getInputNames
-
runInference
public static long runInference(long handle, long[] inputHandles) -
tensorOf
public static long tensorOf(ByteBuffer buf, long[] shape, int dataType, String deviceType, int deviceId) -
zeros
-
ones
-
full
-
arange
public static long arange(float start, float stop, float step, int dataType, String deviceType, int deviceId) -
eye
-
linspace
public static long linspace(float start, float stop, int num, int dataType, String deviceType, int deviceId) -
randint
public static long randint(long low, long high, long[] shape, int dataType, String deviceType, int deviceId) -
randomPermutation
-
uniform
public static long uniform(float low, float high, long[] shape, int dataType, String deviceType, int deviceId) -
randomNormal
public static long randomNormal(float loc, float scale, long[] shape, int dataType, String deviceType, int deviceId) -
hannWindow
-
deleteTensor
public static void deleteTensor(long handle) -
getDataType
public static int getDataType(long handle) -
getDevice
public static int[] getDevice(long handle) -
getShape
public static long[] getShape(long handle) -
duplicate
public static long duplicate(long handle) -
toDevice
-
toBoolean
public static long toBoolean(long handle) -
toDataType
public static long toDataType(long handle, int dataType) -
toByteArray
public static byte[] toByteArray(long handle) -
fullSlice
public static long fullSlice(long handle, long[] min, long[] max, long[] step) -
gather
public static long gather(long handle, long indexHandle, int axis) -
take
public static long take(long handle, long indexHandle) -
put
public static long put(long handle, long indexHandle, long valueHandle) -
scatter
public static long scatter(long handle, long indexHandle, long valueHandle, int axis) -
booleanMask
public static long booleanMask(long handle, long indexHandle, int axis) -
contentEqual
public static boolean contentEqual(long handle, long other) -
eq
public static long eq(long handle, long other) -
neq
public static long neq(long handle, long other) -
gt
public static long gt(long handle, long other) -
gte
public static long gte(long handle, long other) -
lt
public static long lt(long handle, long other) -
lte
public static long lte(long handle, long other) -
add
public static long add(long handle, long other) -
sub
public static long sub(long handle, long other) -
mul
public static long mul(long handle, long other) -
div
public static long div(long handle, long other) -
minimum
public static long minimum(long handle, long other) -
maximum
public static long maximum(long handle, long other) -
remainder
public static long remainder(long handle, long other) -
pow
public static long pow(long handle, long other) -
xlogy
public static long xlogy(long handle, long other) -
exp
public static long exp(long handle) -
log
public static long log(long handle) -
log10
public static long log10(long handle) -
log2
public static long log2(long handle) -
sin
public static long sin(long handle) -
cos
public static long cos(long handle) -
tan
public static long tan(long handle) -
asin
public static long asin(long handle) -
acos
public static long acos(long handle) -
atan
public static long atan(long handle) -
atan2
public static long atan2(long handle, long other) -
sinh
public static long sinh(long handle) -
cosh
public static long cosh(long handle) -
tanh
public static long tanh(long handle) -
abs
public static long abs(long handle) -
neg
public static long neg(long handle) -
sign
public static long sign(long handle) -
square
public static long square(long handle) -
sqrt
public static long sqrt(long handle) -
floor
public static long floor(long handle) -
ceil
public static long ceil(long handle) -
round
public static long round(long handle) -
trunc
public static long trunc(long handle) -
countNonzero
public static long countNonzero(long handle) -
countNonzeroWithAxis
public static long countNonzeroWithAxis(long handle, int axis) -
sum
public static long sum(long handle) -
sumWithAxis
public static long sumWithAxis(long handle, int[] axes, boolean keepDims) -
topK
public static long[] topK(long handle, int k, int axis, boolean largest, boolean sorted) -
max
public static long max(long handle) -
maxWithAxis
public static long maxWithAxis(long handle, int axis, boolean keepDims) -
min
public static long min(long handle) -
minWithAxis
public static long minWithAxis(long handle, int axis, boolean keepDims) -
argMax
public static long argMax(long handle) -
argMaxWithAxis
public static long argMaxWithAxis(long handle, int axis, boolean keepDims) -
argMin
public static long argMin(long handle) -
argMinWithAxis
public static long argMinWithAxis(long handle, int axis, boolean keepDims) -
percentile
public static long percentile(long handle) -
percentileWithAxes
public static long percentileWithAxes(long handle, double percentile, int[] axes) -
mean
public static long mean(long handle) -
meanWithAxis
public static long meanWithAxis(long handle, int[] axis, boolean keepDims) -
median
public static long[] median(long handle, int axis, boolean keepDims) -
cumProd
public static long cumProd(long handle, int axis) -
cumProdWithType
public static long cumProdWithType(long handle, int axis, int dataType) -
prod
public static long prod(long handle) -
cumProdWithAxis
public static long cumProdWithAxis(long handle, int axis, boolean keepDims) -
normalize
public static long normalize(long handle, double p, long dim, double eps) -
rot90
public static long rot90(long handle, int times, int[] axes) -
split
public static long[] split(long handle, long[] indices, int axis) -
flatten
public static long flatten(long handle) -
flattenWithDims
public static long flattenWithDims(long handle, int startDim, int endDim) -
reshape
public static long reshape(long handle, long[] shape) -
expandDims
public static long expandDims(long handle, int axis) -
squeeze
public static long squeeze(long handle, int[] axes) -
logicalAnd
public static long logicalAnd(long handle, long other) -
logicalOr
public static long logicalOr(long handle, long other) -
logicalXor
public static long logicalXor(long handle, long other) -
logicalNot
public static long logicalNot(long handle) -
argSort
public static long argSort(long handle, int axis, boolean ascending) -
sort
public static long sort(long handle, int axis, boolean ascending) -
softmax
public static long softmax(long handle, int axis) -
logSoftmax
public static long logSoftmax(long handle, int axis) -
cumSum
public static long cumSum(long handle, int axis) -
isInf
public static long isInf(long handle) -
isNaN
public static long isNaN(long handle) -
tile
public static long tile(long handle, long[] repeats) -
tileWithAxis
public static long tileWithAxis(long handle, int axis, long repeat) -
tileWithShape
public static long tileWithShape(long handle, long[] shape) -
repeat
public static long repeat(long handle, long repeat, int axis) -
dot
public static long dot(long handle, long other) -
matmul
public static long matmul(long handle, long other) -
batchMatMul
public static long batchMatMul(long handle, long other) -
clip
public static long clip(long handle, double min, double max) -
transpose
public static long transpose(long handle, int axis1, int axis2) -
flip
public static long flip(long handle, int[] axes) -
permute
public static long permute(long handle, int[] axes) -
broadcast
public static long broadcast(long handle, long[] shape) -
nonZero
public static long nonZero(long handle) -
inverse
public static long inverse(long handle) -
norm
public static long norm(long handle, int i, int[] ints, boolean keepDims) -
oneHot
public static long oneHot(long handle, int depth, float onValue, float offValue, int dataType) -
complex
public static long complex(long handle) -
real
public static long real(long handle) -
sigmoid
public static long sigmoid(long handle) -
softPlus
public static long softPlus(long handle) -
softSign
public static long softSign(long handle) -
leakyRelu
public static long leakyRelu(long handle, float alpha) -
elu
public static long elu(long handle, float alpha) -
selu
public static long selu(long handle) -
relu
public static long relu(long handle) -
gelu
public static long gelu(long handle) -
erf
public static long erf(long handle) -
erfinv
public static long erfinv(long handle) -
maxPool
public static long maxPool(long handle, long[] kernelShape, long[] stride, long[] padding, boolean ceilMode) -
adaptiveMaxPool
public static long adaptiveMaxPool(long handle, long[] shape) -
avgPool2d
public static long avgPool2d(long handle, long[] kernelShape, long[] stride) -
adaptiveAvgPool
public static long adaptiveAvgPool(long handle, long[] shape) -
lpPool
public static long lpPool(long handle, float normType, long[] kernelShape, long[] stride, boolean ceilMode) -
where
public static long where(long conditionHandle, long handle, long otherHandle) -
stack
public static long stack(long[] srcArray, int axis) -
concat
public static long concat(long[] srcArray, int axis) -
pick
public static long pick(long handle, long pickHandle, int axis)
-