Package: stablehlo 0.6.0

Sebastian Fischer

stablehlo: Write 'StableHLO' Programs

A low-level interface for building 'StableHLO' programs from R. 'StableHLO' is an operation set and portable intermediate representation for machine learning computations, developed within the 'OpenXLA' project and consumed by compilers such as 'XLA' <https://openxla.org/stablehlo>. The package implements the operations of the 'StableHLO' specification together with their type inference rules, so that output types are derived automatically and invalid programs are rejected with informative errors at construction time. The resulting programs can be compiled and executed on hardware backends such as CPU and GPU using the 'pjrt' package.

Authors:Daniel Falbel [aut], Sebastian Fischer [aut, cre], Nikolai German [aut]

stablehlo_0.6.0.tar.gz
stablehlo_0.6.0.zip(r-4.7-any)stablehlo_0.6.0.zip(r-4.6-any)stablehlo_0.6.0.zip(r-4.5-any)
stablehlo_0.6.0.tgz(r-4.6-any)stablehlo_0.6.0.tgz(r-4.5-any)
stablehlo_0.6.0.tar.gz(r-4.7-any)stablehlo_0.6.0.tar.gz(r-4.6-any)
stablehlo_0.6.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
stablehlo/json (API)

# Install 'stablehlo' in R:
install.packages('stablehlo', repos = c('https://r-xla.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/r-xla/stablehlo/issues

Pkgdown/docs site:https://r-xla.github.io

On CRAN:

Conda:

deep-learninggpustablehloxla

5.04 score 8 stars 1 packages 12 scripts 249 exports 7 dependencies

Last updated from:1b03025362 (on v0.6.0). Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK159
source / vignettesOK192
linux-releaseOK146
macos-releaseOK155
macos-oldrelOK145
windows-develOK134
windows-releaseOK141
windows-oldrelOK130
wasm-releaseOK115

Exports:.current_func.current_moduleas_dtypeBoolAttrConstantconstant_attrConstantAttrConvDimensionNumbersCustomOpBackendConfigDotDimensionNumbersdtypeerror_concatenate_shapeserror_dim_size_mismatcherror_dimension_uniquenesserror_index_in_seterror_index_out_of_boundserror_indices_not_sortederror_permute_indexerror_stablehloerror_unequal_typeserror_unexpected_list_typeformat_doubleFuncFuncIdFuncInputFuncInputsFuncOutputFuncOutputsFuncValueGatherDimensionNumbershlo_abshlo_acoshlo_acoshhlo_addhlo_after_allhlo_andhlo_asinhlo_asinhhlo_atanhlo_atan2hlo_atanhhlo_bessel_i1ehlo_bitcast_converthlo_broadcast_in_dimhlo_callhlo_casehlo_cbrthlo_ceilhlo_choleskyhlo_clamphlo_closurehlo_comparehlo_concatenatehlo_converthlo_convolutionhlo_coshhlo_cosinehlo_count_leading_zeroshlo_custom_callhlo_digammahlo_dividehlo_dot_generalhlo_dynamic_slicehlo_dynamic_update_slicehlo_emptyhlo_erfhlo_erf_invhlo_erfchlo_exponentialhlo_exponential_minus_onehlo_floorhlo_funchlo_gatherhlo_ifhlo_inputhlo_iotahlo_is_finitehlo_is_infhlo_is_neg_infhlo_is_pos_infhlo_lgammahlo_loghlo_log_plus_onehlo_logistichlo_maximumhlo_minimumhlo_modulehlo_multiplyhlo_negatehlo_nothlo_optimization_barrierhlo_orhlo_padhlo_polygammahlo_popcnthlo_powerhlo_reducehlo_reduce_windowhlo_remainderhlo_reshapehlo_returnhlo_reversehlo_rng_bit_generatorhlo_round_nearest_afzhlo_round_nearest_evenhlo_rsqrthlo_scalarhlo_scatterhlo_selecthlo_shift_lefthlo_shift_right_arithmetichlo_shift_right_logicalhlo_signhlo_sinehlo_sinhhlo_slicehlo_sorthlo_sqrthlo_squarehlo_subtracthlo_tanhlo_tanhhlo_tensorhlo_top_khlo_transposehlo_triangular_solvehlo_whilehlo_xorindex_vecinfer_types_absinfer_types_acosinfer_types_acoshinfer_types_addinfer_types_after_allinfer_types_andinfer_types_asininfer_types_asinhinfer_types_ataninfer_types_atan2infer_types_atanhinfer_types_bessel_i1einfer_types_bitcast_convertinfer_types_broadcast_in_diminfer_types_callinfer_types_caseinfer_types_cbrtinfer_types_ceilinfer_types_clampinfer_types_compareinfer_types_concatenateinfer_types_constantinfer_types_convertinfer_types_convolutioninfer_types_coshinfer_types_cosineinfer_types_count_leading_zerosinfer_types_custom_callinfer_types_digammainfer_types_divideinfer_types_dot_generalinfer_types_dynamic_sliceinfer_types_dynamic_update_sliceinfer_types_erfinfer_types_erf_invinfer_types_erfcinfer_types_exponentialinfer_types_exponential_minus_oneinfer_types_float_bivinfer_types_float_uniinfer_types_floorinfer_types_gatherinfer_types_generic_bivinfer_types_generic_uniinfer_types_ifinfer_types_integer_bivinfer_types_integer_uniinfer_types_integerish_bivinfer_types_integerish_uniinfer_types_iotainfer_types_is_finiteinfer_types_is_infinfer_types_is_neg_infinfer_types_is_pos_infinfer_types_lgammainfer_types_loginfer_types_log_plus_oneinfer_types_logisticinfer_types_maximuminfer_types_minimuminfer_types_multiplyinfer_types_negateinfer_types_notinfer_types_numeric_bivinfer_types_numeric_uniinfer_types_optimization_barrierinfer_types_orinfer_types_padinfer_types_polygammainfer_types_popcntinfer_types_powerinfer_types_reduceinfer_types_reduce_windowinfer_types_remainderinfer_types_reshapeinfer_types_returninfer_types_reverseinfer_types_rng_bit_generatorinfer_types_round_nearest_afzinfer_types_round_nearest_eveninfer_types_rsqrtinfer_types_scatterinfer_types_selectinfer_types_shift_leftinfer_types_shift_right_arithmeticinfer_types_shift_right_logicalinfer_types_signinfer_types_sineinfer_types_sinhinfer_types_sliceinfer_types_sortinfer_types_sqrtinfer_types_squareinfer_types_subtractinfer_types_taninfer_types_tanhinfer_types_top_kinfer_types_transposeinfer_types_triangular_solveinfer_types_whileinfer_types_xoris_dtypelocal_funclocal_moduleModuleOpInputAttrOpInputFuncOutputOperandAliasr_to_constantreprScalarAttrScatterDimensionNumbersshapeShapeStringAttrTensorTypeto_one_basedValueIdValueTypeValueTypes

Dependencies:backportscheckmateclifastmaprlangwithrxlamisc

Readme and manuals

Help Manual

Help pageTopics
Get the last function created.current_func
Get the current module.current_module
BoolAttrBoolAttr
ConstantConstant
Create a ConstantAttr from R valuesconstant_attr
ConstantAttrConstantAttr
ConvDimensionNumbersConvDimensionNumbers
CustomOpBackendConfigCustomOpBackendConfig
DotDimensionNumbersDotDimensionNumbers
ErrorConcatenateShapeserror_concatenate_shapes
ErrorDimSizeMismatcherror_dim_size_mismatch
ErrorDimensionUniquenesserror_dimension_uniqueness
ErrorIndexInSeterror_index_in_set
ErrorIndexOutOfBoundserror_index_out_of_bounds
ErrorIndicesNotSortederror_indices_not_sorted
ErrorPermuteIndexerror_permute_index
ErrorStablehloerror_stablehlo
ErrorUnequalTypeserror_unequal_types
ErrorUnexpectedListTypeerror_unexpected_list_type
Format Double Array with Scientific Notationformat_double
FuncFunc
FuncIdFuncId
FuncInputFuncInput
FuncInputsFuncInputs
FuncOutputFuncOutput
FuncOutputsFuncOutputs
FuncValueFuncValue
GatherDimensionNumbersGatherDimensionNumbers
Cholesky Operatorhlo_cholesky
Create a Closurehlo_closure
Create a Constanthlo_constant hlo_empty hlo_scalar hlo_tensor infer_types_constant
Custom Call Operationhlo_custom_call
Create a functionhlo_func local_func
Create a input to a functionhlo_input
Create a modulehlo_module local_module
index_vecindex_vec
Abs Operatorhlo_abs infer_types_abs
Acos Operator (CHLO)hlo_acos infer_types_acos
Acosh Operator (CHLO)hlo_acosh infer_types_acosh
Add Operatorhlo_add infer_types_add
AfterAll Operatorhlo_after_all infer_types_after_all
And Operatorhlo_and infer_types_and
Asin Operator (CHLO)hlo_asin infer_types_asin
Asinh Operator (CHLO)hlo_asinh infer_types_asinh
Atan Operator (CHLO)hlo_atan infer_types_atan
Atan2 Operatorhlo_atan2 infer_types_atan2
Atanh Operator (CHLO)hlo_atanh infer_types_atanh
BesselI1e Operator (CHLO)hlo_bessel_i1e infer_types_bessel_i1e
BitcastConvert Operatorhlo_bitcast_convert infer_types_bitcast_convert
BroadcastInDim Operatorhlo_broadcast_in_dim infer_types_broadcast_in_dim
Call a Functionhlo_call infer_types_call
Case Operatorhlo_case infer_types_case
Cbrt Operatorhlo_cbrt infer_types_cbrt
Ceil Operatorhlo_ceil infer_types_ceil
Clamp Operatorhlo_clamp infer_types_clamp
Compare Operatorhlo_compare infer_types_compare
Concatenate Operatorhlo_concatenate infer_types_concatenate
Convert Operatorhlo_convert infer_types_convert
Convolution Operatorhlo_convolution infer_types_convolution
Cosh Operator (CHLO)hlo_cosh infer_types_cosh
Cosine Operatorhlo_cosine infer_types_cosine
CountLeadingZeros Operatorhlo_count_leading_zeros infer_types_count_leading_zeros
Infer types for custom callinfer_types_custom_call
Digamma Operator (CHLO)hlo_digamma infer_types_digamma
Divide Operatorhlo_divide infer_types_divide
DotGeneral Operatorhlo_dot_general infer_types_dot_general
DynamicSlice Operatorhlo_dynamic_slice infer_types_dynamic_slice
DynamicUpdateSlice Operatorhlo_dynamic_update_slice infer_types_dynamic_update_slice
Erf Operator (CHLO)hlo_erf infer_types_erf
ErfInv Operator (CHLO)hlo_erf_inv infer_types_erf_inv
Erfc Operator (CHLO)hlo_erfc infer_types_erfc
Exponential Operatorhlo_exponential infer_types_exponential
ExponentialMinusOne Operatorhlo_exponential_minus_one infer_types_exponential_minus_one
Infer types for float binary operationsinfer_types_float_biv
Infer types for float unary operationsinfer_types_float_uni
Floor Operatorhlo_floor infer_types_floor
Gather Operatorhlo_gather infer_types_gather
Infer types for binary operationsinfer_types_generic_biv
Infer types for unary operationsinfer_types_generic_uni
If Operatorhlo_if infer_types_if
Infer types for integer binary operationsinfer_types_integer_biv
Infer types for integer unary operationsinfer_types_integer_uni
Infer types for boolean integerish operationsinfer_types_integerish_biv
Infer types for integerish unary operationsinfer_types_integerish_uni
Iota Operatorhlo_iota infer_types_iota
IsFinite Operatorhlo_is_finite infer_types_is_finite
IsInf Operator (CHLO)hlo_is_inf infer_types_is_inf
IsNegInf Operator (CHLO)hlo_is_neg_inf infer_types_is_neg_inf
IsPosInf Operator (CHLO)hlo_is_pos_inf infer_types_is_pos_inf
Lgamma Operator (CHLO)hlo_lgamma infer_types_lgamma
Log Operatorhlo_log infer_types_log
LogPlusOne Operatorhlo_log_plus_one infer_types_log_plus_one
Logistic Operatorhlo_logistic infer_types_logistic
Maximum Operatorhlo_maximum infer_types_maximum
Minimum Operatorhlo_minimum infer_types_minimum
Multiply Operatorhlo_multiply infer_types_multiply
Negate Operatorhlo_negate infer_types_negate
Not Operatorhlo_not infer_types_not
Infer types for numeric binary operationsinfer_types_numeric_biv
Infer types for numeric unary operationsinfer_types_numeric_uni
OptimizationBarrier Operatorhlo_optimization_barrier infer_types_optimization_barrier
Or Operatorhlo_or infer_types_or
Pad Operatorhlo_pad infer_types_pad
Polygamma Operator (CHLO)hlo_polygamma infer_types_polygamma
Popcnt Operatorhlo_popcnt infer_types_popcnt
Power Operatorhlo_power infer_types_power
Reduce Operatorhlo_reduce infer_types_reduce
ReduceWindow Operatorhlo_reduce_window infer_types_reduce_window
Remainder Operatorhlo_remainder infer_types_remainder
Reshape Operatorhlo_reshape infer_types_reshape
Return Valueshlo_return infer_types_return
Reverse Operatorhlo_reverse infer_types_reverse
RngBitGenerator Operatorhlo_rng_bit_generator infer_types_rng_bit_generator
RoundNearestAfz Operatorhlo_round_nearest_afz infer_types_round_nearest_afz
RoundNearestEven Operatorhlo_round_nearest_even infer_types_round_nearest_even
Rsqrt Operatorhlo_rsqrt infer_types_rsqrt
Scatter Operatorhlo_scatter infer_types_scatter
Select Operatorhlo_select infer_types_select
ShiftLeft Operatorhlo_shift_left infer_types_shift_left
ShiftRightArithmetic Operatorhlo_shift_right_arithmetic infer_types_shift_right_arithmetic
ShiftRightLogical Operatorhlo_shift_right_logical infer_types_shift_right_logical
Sign Operatorhlo_sign infer_types_sign
Sine Operatorhlo_sine infer_types_sine
Sinh Operator (CHLO)hlo_sinh infer_types_sinh
Slice Operatorhlo_slice infer_types_slice
Sort Operatorhlo_sort infer_types_sort
Sqrt Operatorhlo_sqrt infer_types_sqrt
Square Operator (CHLO)hlo_square infer_types_square
Subtract Operatorhlo_subtract infer_types_subtract
Tan Operatorhlo_tan infer_types_tan
Tanh Operatorhlo_tanh infer_types_tanh
TopK Operator (CHLO)hlo_top_k infer_types_top_k
Transpose Operatorhlo_transpose infer_types_transpose
TriangularSolve Operatorhlo_triangular_solve infer_types_triangular_solve
While Operatorhlo_while infer_types_while
Xor Operatorhlo_xor infer_types_xor
ModuleModule
OpInputAttrOpInputAttr
OpInputFuncOpInputFunc
OutputOperandAliasOutputOperandAlias
Convert R value to Constantr_to_constant
Generate string representation for objectrepr
ScalarAttrScalarAttr
ScatterDimensionNumbersScatterDimensionNumbers
ShapeShape
StringAttrStringAttr
TensorTypeTensorType
Convert 0-based indices to 1-basedto_one_based
ValueIdValueId
ValueTypeValueType
ValueTypesValueTypes