Package: stablehlo 0.6.0
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:
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
Last updated from:1b03025362 (on v0.6.0). Checks:9 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel | OK | 159 | ||
| source / vignettes | OK | 192 | ||
| linux-release | OK | 146 | ||
| macos-release | OK | 155 | ||
| macos-oldrel | OK | 145 | ||
| windows-devel | OK | 134 | ||
| windows-release | OK | 141 | ||
| windows-oldrel | OK | 130 | ||
| wasm-release | OK | 115 |
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
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Get the last function created | .current_func |
| Get the current module | .current_module |
| BoolAttr | BoolAttr |
| Constant | Constant |
| Create a ConstantAttr from R values | constant_attr |
| ConstantAttr | ConstantAttr |
| ConvDimensionNumbers | ConvDimensionNumbers |
| CustomOpBackendConfig | CustomOpBackendConfig |
| DotDimensionNumbers | DotDimensionNumbers |
| ErrorConcatenateShapes | error_concatenate_shapes |
| ErrorDimSizeMismatch | error_dim_size_mismatch |
| ErrorDimensionUniqueness | error_dimension_uniqueness |
| ErrorIndexInSet | error_index_in_set |
| ErrorIndexOutOfBounds | error_index_out_of_bounds |
| ErrorIndicesNotSorted | error_indices_not_sorted |
| ErrorPermuteIndex | error_permute_index |
| ErrorStablehlo | error_stablehlo |
| ErrorUnequalTypes | error_unequal_types |
| ErrorUnexpectedListType | error_unexpected_list_type |
| Format Double Array with Scientific Notation | format_double |
| Func | Func |
| FuncId | FuncId |
| FuncInput | FuncInput |
| FuncInputs | FuncInputs |
| FuncOutput | FuncOutput |
| FuncOutputs | FuncOutputs |
| FuncValue | FuncValue |
| GatherDimensionNumbers | GatherDimensionNumbers |
| Cholesky Operator | hlo_cholesky |
| Create a Closure | hlo_closure |
| Create a Constant | hlo_constant hlo_empty hlo_scalar hlo_tensor infer_types_constant |
| Custom Call Operation | hlo_custom_call |
| Create a function | hlo_func local_func |
| Create a input to a function | hlo_input |
| Create a module | hlo_module local_module |
| index_vec | index_vec |
| Abs Operator | hlo_abs infer_types_abs |
| Acos Operator (CHLO) | hlo_acos infer_types_acos |
| Acosh Operator (CHLO) | hlo_acosh infer_types_acosh |
| Add Operator | hlo_add infer_types_add |
| AfterAll Operator | hlo_after_all infer_types_after_all |
| And Operator | hlo_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 Operator | hlo_atan2 infer_types_atan2 |
| Atanh Operator (CHLO) | hlo_atanh infer_types_atanh |
| BesselI1e Operator (CHLO) | hlo_bessel_i1e infer_types_bessel_i1e |
| BitcastConvert Operator | hlo_bitcast_convert infer_types_bitcast_convert |
| BroadcastInDim Operator | hlo_broadcast_in_dim infer_types_broadcast_in_dim |
| Call a Function | hlo_call infer_types_call |
| Case Operator | hlo_case infer_types_case |
| Cbrt Operator | hlo_cbrt infer_types_cbrt |
| Ceil Operator | hlo_ceil infer_types_ceil |
| Clamp Operator | hlo_clamp infer_types_clamp |
| Compare Operator | hlo_compare infer_types_compare |
| Concatenate Operator | hlo_concatenate infer_types_concatenate |
| Convert Operator | hlo_convert infer_types_convert |
| Convolution Operator | hlo_convolution infer_types_convolution |
| Cosh Operator (CHLO) | hlo_cosh infer_types_cosh |
| Cosine Operator | hlo_cosine infer_types_cosine |
| CountLeadingZeros Operator | hlo_count_leading_zeros infer_types_count_leading_zeros |
| Infer types for custom call | infer_types_custom_call |
| Digamma Operator (CHLO) | hlo_digamma infer_types_digamma |
| Divide Operator | hlo_divide infer_types_divide |
| DotGeneral Operator | hlo_dot_general infer_types_dot_general |
| DynamicSlice Operator | hlo_dynamic_slice infer_types_dynamic_slice |
| DynamicUpdateSlice Operator | hlo_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 Operator | hlo_exponential infer_types_exponential |
| ExponentialMinusOne Operator | hlo_exponential_minus_one infer_types_exponential_minus_one |
| Infer types for float binary operations | infer_types_float_biv |
| Infer types for float unary operations | infer_types_float_uni |
| Floor Operator | hlo_floor infer_types_floor |
| Gather Operator | hlo_gather infer_types_gather |
| Infer types for binary operations | infer_types_generic_biv |
| Infer types for unary operations | infer_types_generic_uni |
| If Operator | hlo_if infer_types_if |
| Infer types for integer binary operations | infer_types_integer_biv |
| Infer types for integer unary operations | infer_types_integer_uni |
| Infer types for boolean integerish operations | infer_types_integerish_biv |
| Infer types for integerish unary operations | infer_types_integerish_uni |
| Iota Operator | hlo_iota infer_types_iota |
| IsFinite Operator | hlo_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 Operator | hlo_log infer_types_log |
| LogPlusOne Operator | hlo_log_plus_one infer_types_log_plus_one |
| Logistic Operator | hlo_logistic infer_types_logistic |
| Maximum Operator | hlo_maximum infer_types_maximum |
| Minimum Operator | hlo_minimum infer_types_minimum |
| Multiply Operator | hlo_multiply infer_types_multiply |
| Negate Operator | hlo_negate infer_types_negate |
| Not Operator | hlo_not infer_types_not |
| Infer types for numeric binary operations | infer_types_numeric_biv |
| Infer types for numeric unary operations | infer_types_numeric_uni |
| OptimizationBarrier Operator | hlo_optimization_barrier infer_types_optimization_barrier |
| Or Operator | hlo_or infer_types_or |
| Pad Operator | hlo_pad infer_types_pad |
| Polygamma Operator (CHLO) | hlo_polygamma infer_types_polygamma |
| Popcnt Operator | hlo_popcnt infer_types_popcnt |
| Power Operator | hlo_power infer_types_power |
| Reduce Operator | hlo_reduce infer_types_reduce |
| ReduceWindow Operator | hlo_reduce_window infer_types_reduce_window |
| Remainder Operator | hlo_remainder infer_types_remainder |
| Reshape Operator | hlo_reshape infer_types_reshape |
| Return Values | hlo_return infer_types_return |
| Reverse Operator | hlo_reverse infer_types_reverse |
| RngBitGenerator Operator | hlo_rng_bit_generator infer_types_rng_bit_generator |
| RoundNearestAfz Operator | hlo_round_nearest_afz infer_types_round_nearest_afz |
| RoundNearestEven Operator | hlo_round_nearest_even infer_types_round_nearest_even |
| Rsqrt Operator | hlo_rsqrt infer_types_rsqrt |
| Scatter Operator | hlo_scatter infer_types_scatter |
| Select Operator | hlo_select infer_types_select |
| ShiftLeft Operator | hlo_shift_left infer_types_shift_left |
| ShiftRightArithmetic Operator | hlo_shift_right_arithmetic infer_types_shift_right_arithmetic |
| ShiftRightLogical Operator | hlo_shift_right_logical infer_types_shift_right_logical |
| Sign Operator | hlo_sign infer_types_sign |
| Sine Operator | hlo_sine infer_types_sine |
| Sinh Operator (CHLO) | hlo_sinh infer_types_sinh |
| Slice Operator | hlo_slice infer_types_slice |
| Sort Operator | hlo_sort infer_types_sort |
| Sqrt Operator | hlo_sqrt infer_types_sqrt |
| Square Operator (CHLO) | hlo_square infer_types_square |
| Subtract Operator | hlo_subtract infer_types_subtract |
| Tan Operator | hlo_tan infer_types_tan |
| Tanh Operator | hlo_tanh infer_types_tanh |
| TopK Operator (CHLO) | hlo_top_k infer_types_top_k |
| Transpose Operator | hlo_transpose infer_types_transpose |
| TriangularSolve Operator | hlo_triangular_solve infer_types_triangular_solve |
| While Operator | hlo_while infer_types_while |
| Xor Operator | hlo_xor infer_types_xor |
| Module | Module |
| OpInputAttr | OpInputAttr |
| OpInputFunc | OpInputFunc |
| OutputOperandAlias | OutputOperandAlias |
| Convert R value to Constant | r_to_constant |
| Generate string representation for object | repr |
| ScalarAttr | ScalarAttr |
| ScatterDimensionNumbers | ScatterDimensionNumbers |
| Shape | Shape |
| StringAttr | StringAttr |
| TensorType | TensorType |
| Convert 0-based indices to 1-based | to_one_based |
| ValueId | ValueId |
| ValueType | ValueType |
| ValueTypes | ValueTypes |
