PPHlo API reference#

PPHlo is short for (SPU High level ops), it’s the assembly language of SPU.

PPHlo is built on MLIR infrastructure, the concrete ops definition could be found here.

Op List#

pphlo.pad (::mlir::pphlo::PadOp)#

Pad operator

Pads the edges of operand with the padding_value and according to the passed configuration.

See https://www.tensorflow.org/xla/operation_semantics#pad.

Traits: AlwaysSpeculatableImplTrait, InferTensorType, SameOperandsAndResultElementType

Interfaces: ConditionallySpeculatable, InferShapedTypeOpInterface, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

edge_padding_low

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

edge_padding_high

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

interior_padding

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

padding_value

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.abs (::mlir::pphlo::AbsOp)#

Absolute value operator

Returns abs(operand) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.add (::mlir::pphlo::AddOp)#

Addition operator

Returns lhs + rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Commutative, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.and (::mlir::pphlo::AndOp)#

Logical and

Returns logical_and(lhs, rhs) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Commutative, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of public integer type or secret integer type values

rhs

statically shaped tensor of public integer type or secret integer type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.argmax (::mlir::pphlo::ArgMaxOp)#

ArgMax operator

Returns the max value and index in a window.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

window_dimensions

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

window_strides

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

base_dilations

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

window_dilations

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

padding

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

onehot_index

::mlir::BoolAttr

bool attribute

Operands:#

Operand

Description

input

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

«unnamed»

statically shaped tensor of public integer type or secret integer type values

pphlo.bitcast_convert (::mlir::pphlo::BitcastConvertOp)#

BitcastConvert operator

Similar to a ‘tf.bitcast’ in TensorFlow, performs an element-wise bitcast operation from a data shape to a target shape. The dimensions must match, and the conversion is an element-wise one. Bitcast is implemented as a low-level cast, so machines with different floating-point representations will give different results.

See https://www.tensorflow.org/xla/operation_semantics#bitcastconverttype.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.broadcast (::mlir::pphlo::BroadcastOp)#

Broadcast a tensor into the given shape by adding dimensions.

Broadcasts the operand tensor to a higher rank. This is not the limited form of broadcasting exposed as the XLA client broadcast op, but rather the more powerful “InDim” broadcasting, which is closer to the HLO broadcast op and exposed in the XLA client BroadcastInDim method.

broadcast_dimensions maps the operand dimension number to the target shape dimension number. It must have the same size as the rank of the operand. The mapped dimensions must either be the same size or the dimension being broadcast from must be size 1 (degenerate broadcasting).

For a scalar (0D tensor) operand, broadcast_dimensions must be empty. The The scalar value will be broadcast to every element in the target shape.

See https://www.tensorflow.org/xla/broadcasting.

Traits: AlwaysSpeculatableImplTrait, SameOperandsAndResultElementType

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

broadcast_dimensions

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.case (::mlir::pphlo::CaseOp)#

Switch-Case operator

Returns the result of executing branches[index]. If index is < 0 or >= N, then branches[N-1] is executed as the default branch.

The type of the returned values of each branch must be the same and equal to the types of the values returned by the operation.

Note that if index is public only one of the branches will be executed depending on the value of index, otherwise all branches will be executed and select results based on index value.

Traits: RecursiveMemoryEffects, SingleBlockImplicitTerminator

Operands:#

Operand

Description

index

statically shaped tensor of public integer type or secret integer type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.ceil (::mlir::pphlo::CeilOp)#

Ceil operator

Returns Ceil(operand) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public fixed-point type or secret fixed-point type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.clamp (::mlir::pphlo::ClampOp)#

Clamp operator

Clamps an operand to within the range between a minimum and maximum value.

Note: All three arrays must be the same shape. Alternatively, as a restricted form of broadcasting, min and/or max can be a scalar (0D tensor) of the element type of the tensor operand.

See https://www.tensorflow.org/xla/operation_semantics#clamp.

Traits: AlwaysSpeculatableImplTrait, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

min

statically shaped tensor of PPHlo public type or PPHlo secret type values

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

max

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.concatenate (::mlir::pphlo::ConcatenateOp)#

Concatenate op

Concatenates a set of tensors along the specified dimension.

See https://www.tensorflow.org/xla/operation_semantics#concatenate.

Traits: AlwaysSpeculatableImplTrait, SameOperandsAndResultElementType

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

dimension

::mlir::IntegerAttr

64-bit signless integer attribute

Operands:#

Operand

Description

val

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.constant (::mlir::pphlo::ConstantOp)#

Constant operator

Create a constant value. Traits: AlwaysSpeculatableImplTrait, ConstantLike

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

value

::mlir::ElementsAttr

constant vector/tensor attribute

Results:#

Result

Description

output

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.convert (::mlir::pphlo::ConvertOp)#

Convert operator

Performs element-wise conversion of values from one type to another, e.g.fxp to int.

See https://www.tensorflow.org/xla/operation_semantics#convertelementtype.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.convolution (::mlir::pphlo::ConvolutionOp)#

Convolution operator

Syntax:

operation ::= `pphlo.convolution` `(`operands`)`
              `dim_numbers` `=` custom<ConvolutionDimensions>($dimension_numbers) `,`
              `window` `=` `{` custom<WindowAttributes>($window_strides) `}`
              attr-dict `:` functional-type(operands, results)

Computes a convolution of the kind used in neural networks.

See https://www.tensorflow.org/xla/operation_semantics#conv_convolution.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

window_strides

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

dimension_numbers

::mlir::pphlo::ConvDimensionNumbersAttr

Structure of dimension information for conv op

feature_group_count

::mlir::IntegerAttr

64-bit signless integer attribute

batch_group_count

::mlir::IntegerAttr

64-bit signless integer attribute

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.dbg_print (::mlir::pphlo::DbgPrintOp)#

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.divide (::mlir::pphlo::DivOp)#

Division operator

Returns lhs / rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.dot_general (::mlir::pphlo::DotGeneralOp)#

General Dot operator

Performs general dot products between vectors, vector/matrix and matrix/matrix multiplication.

See https://www.tensorflow.org/xla/operation_semantics#dotgeneral.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

dot_dimension_numbers

::mlir::pphlo::DotDimensionNumbersAttr

Attribute that models the dimension information for dot.

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.dot (::mlir::pphlo::DotOp)#

Dot operator

Performs dot products between vectors, vector/matrix and matrix/matrix multiplication.

See https://www.tensorflow.org/xla/operation_semantics#dot.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.dynamic-slice (::mlir::pphlo::DynamicSliceOp)#

Dynamic Slice operator

Extracts a sub-array from the input array at dynamic start_indices.

See https://www.tensorflow.org/xla/operation_semantics#dynamicslice.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

slice_sizes

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

start_indices

0D tensor of public integer type or secret integer type values

Results:#

Result

Description

result

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.dynamic-update-slice (::mlir::pphlo::DynamicUpdateSliceOp)#

Dynamic Update Slice operator

DynamicUpdateSlice generates a result which is the value of the input array operand, with a slice update overwritten at start_indices.

See https://www.tensorflow.org/xla/operation_semantics#dynamicupdateslice.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

update

statically shaped tensor of PPHlo public type or PPHlo secret type values

start_indices

0D tensor of public integer type or secret integer type values

Results:#

Result

Description

result

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.epsilon (::mlir::pphlo::EpsilonOp)#

Epsilon operator

Return a value that representation runtime epsilon. Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Results:#

Result

Description

output

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.equal (::mlir::pphlo::EqualOp)#

Equal comparison operator

Returns lhs == rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_comparison_operations.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public integer type or secret integer type values

pphlo.exponential (::mlir::pphlo::ExpOp)#

Exponential operator

Returns e ^ (operand) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public fixed-point type or secret fixed-point type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.exponential_minus_one (::mlir::pphlo::Expm1Op)#

Exponential minus one operator

Returns e^(operand) - 1 element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public fixed-point type or secret fixed-point type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.floor (::mlir::pphlo::FloorOp)#

Floor operator

Returns Floor(operand) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public fixed-point type or secret fixed-point type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.gather (::mlir::pphlo::GatherOp)#

Gather operator

Stitches together several slices of operand from offsets specified in start_indices (each slice at a potentially different runtime offset).

See https://www.tensorflow.org/xla/operation_semantics#gather.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

dimension_numbers

::mlir::pphlo::GatherDimensionNumbersAttr

Attribute that models the dimension information for gather

slice_sizes

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

indices_are_sorted

::mlir::BoolAttr

bool attribute

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

start_indices

statically shaped tensor of public integer type or secret integer type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.greater_equal (::mlir::pphlo::GreaterEqualOp)#

greater_equal comparison operator

Returns lhs >= rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_comparison_operations.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public integer type or secret integer type values

pphlo.greater (::mlir::pphlo::GreaterOp)#

greater comparison operator

elementwise lhs > rhs. Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public integer type or secret integer type values

pphlo.if (::mlir::pphlo::IfOp)#

If operator

Returns the result of executing either a true or false function depending on the result of a condition function.

See https://www.tensorflow.org/xla/operation_semantics#conditional.

Traits: RecursiveMemoryEffects, SingleBlockImplicitTerminator

Operands:#

Operand

Description

condition

statically shaped tensor of public integer type or secret integer type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.iota (::mlir::pphlo::IotaOp)#

Iota operator

Creates a rank 1 array of values starting at zero and incrementing by one.

See https://www.tensorflow.org/xla/operation_semantics#iota

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

iota_dimension

::mlir::IntegerAttr

64-bit signless integer attribute

Results:#

Result

Description

output

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.less_equal (::mlir::pphlo::LessEqualOp)#

less_equal comparison operator

elementwise lhs <= rhs. Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public integer type or secret integer type values

pphlo.less (::mlir::pphlo::LessOp)#

less comparison operator

Returns lhs < rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_comparison_operations.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public integer type or secret integer type values

pphlo.log_plus_one (::mlir::pphlo::Log1pOp)#

Log1p operator

Returns log(operand + 1) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public fixed-point type or secret fixed-point type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.log (::mlir::pphlo::LogOp)#

Log operator

Returns log(operand) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public fixed-point type or secret fixed-point type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.logistic (::mlir::pphlo::LogisticOp)#

Reciprocal operator

Returns logistic(operand) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public fixed-point type or secret fixed-point type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.maximum (::mlir::pphlo::MaxOp)#

Maximum operator

Returns max(lhs, rhs) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Commutative, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.maxpool_scatter (::mlir::pphlo::MaxPoolScatterOp)#

MaxPool Scatter operator

Generates a result which is the value of the input array operand, with several slices (at indices specified by scatter_indices) updated with the values in updates using update_computation.

See https://www.tensorflow.org/xla/operation_semantics#scatter.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

window_dimensions

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

window_strides

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

padding

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

Operands:#

Operand

Description

scatter_indices

statically shaped tensor of public integer type or secret integer type values

update

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.minimum (::mlir::pphlo::MinOp)#

Minimum operator

Returns min(lhs, rhs) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Commutative, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.multiply (::mlir::pphlo::MulOp)#

Multiplication operator

Returns lhs * rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Commutative, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.negate (::mlir::pphlo::NegOp)#

Negation operator

Returns - operand element - wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.not_equal (::mlir::pphlo::NotEqualOp)#

Not-equal comparison operator

Returns lhs != rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_comparison_operations.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public integer type or secret integer type values

pphlo.not (::mlir::pphlo::NotOp)#

Not operator

Returns !operand element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public integer type or secret integer type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public integer type or secret integer type values

pphlo.or (::mlir::pphlo::OrOp)#

Logical or

Returns logical_or(lhs, rhs) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Commutative, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of public integer type or secret integer type values

rhs

statically shaped tensor of public integer type or secret integer type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.power (::mlir::pphlo::PowOp)#

Power operator

Returns lhs ^ rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.prefer_a (::mlir::pphlo::PreferAOp)#

Prefer AShare operator

Convert input to AShare if possible.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.reciprocal (::mlir::pphlo::ReciprocalOp)#

Reciprocal operator

Returns 1.0 / operand element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public fixed-point type or secret fixed-point type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.reduce (::mlir::pphlo::ReduceOp)#

Reduce operator

Returns the result of executing a reduction function on one or more arrays in parallel.

See https://www.tensorflow.org/xla/operation_semantics#reduce.

Traits: RecursiveMemoryEffects, SameVariadicOperandSize, SingleBlockImplicitTerminator

Attributes:#

Attribute

MLIR Type

Description

dimensions

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

Operands:#

Operand

Description

inputs

statically shaped tensor of PPHlo public type or PPHlo secret type values

init_values

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.reduce_window (::mlir::pphlo::ReduceWindowOp)#

ReduceWindow operator

Returns the result of executing a reduction function over all elements in each window of one or more arrays.

See https://www.tensorflow.org/xla/operation_semantics#reducewindow.

Traits: RecursiveMemoryEffects, SameVariadicOperandSize, SingleBlockImplicitTerminator

Attributes:#

Attribute

MLIR Type

Description

window_dimensions

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

window_strides

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

base_dilations

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

window_dilations

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

padding

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

Operands:#

Operand

Description

inputs

statically shaped tensor of PPHlo public type or PPHlo secret type values

init_values

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.remainder (::mlir::pphlo::RemOp)#

Remainder operator

Returns lhs % rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.reshape (::mlir::pphlo::ReshapeOp)#

Reshape operator

Reshapes the dimensions of operand into a new configuration.

See https://www.tensorflow.org/xla/operation_semantics#reshape.

Traits: AlwaysSpeculatableImplTrait, SameOperandsAndResultElementType

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.return (::mlir::pphlo::ReturnOp)#

The `pphlo.return` operation terminates a region and returns values.

Traits: AlwaysSpeculatableImplTrait, Terminator

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

results

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.reverse (::mlir::pphlo::ReverseOp)#

Reverse operator

Reverses the specified dimensions of operand according to the given dimensions.

See https://www.tensorflow.org/xla/operation_semantics#rev_reverse.

Traits: AlwaysSpeculatableImplTrait, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

dimensions

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.rng (::mlir::pphlo::RngOp)#

RNG with uniform distribution.

Constructs an output of a given shape with random numbers generated following the uniform distribution over the interval [a,b). The parameters and output element type have to be an integral type or a fixed point type, and the types have to be consistent.

See https://www.tensorflow.org/xla/operation_semantics#rnguniform.

Traits: SameOperandsAndResultElementType

Operands:#

Operand

Description

a

statically shaped tensor of PPHlo public type or PPHlo secret type values

b

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.round_nearest_afz (::mlir::pphlo::RoundOp)#

Round operator, ties away from zero

Returns Round(operand) element-wise, rounding to nearest integer with half-way cases rounding away from zero.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public fixed-point type or secret fixed-point type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.rsqrt (::mlir::pphlo::RsqrtOp)#

Reciprocal of square-root operator

Returns rsqrt(operand) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public fixed-point type or secret fixed-point type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.select_and_scatter (::mlir::pphlo::SelectAndScatterOp)#

SelectAndScatter operator

Runs a windowed selection select function over operand with shape window_dimensions and stride window_strides. This will produce an amount of selected locations whose shape matches source. These are then scattered to the output which is initialized with init_value. Multiple scattered elements which land in the same output location are combined using the scatter function.

See https://www.tensorflow.org/xla/operation_semantics#selectandscatter.

Traits: RecursiveMemoryEffects

Attributes:#

Attribute

MLIR Type

Description

window_dimensions

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

window_strides

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

padding

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

source

statically shaped tensor of PPHlo public type or PPHlo secret type values

init_value

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.select (::mlir::pphlo::SelectOp)#

Select operator

Constructs an output tensor from the elements of on_true and on_false based on the values of pred. All three operands must be of the same shape with the exception of pred, which may also be a scalar in which case it is broadcasted.

See https://www.tensorflow.org/xla/operation_semantics#select.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

pred

statically shaped tensor of public integer type or secret integer type values

on_true

statically shaped tensor of PPHlo public type or PPHlo secret type values

on_false

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.shift_left (::mlir::pphlo::ShiftLeftOp)#

Shift Left operator

Returns lhs << rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.shift_right_arithmetic (::mlir::pphlo::ShiftRightArithmeticOp)#

Shift right arithmetic operator

Returns arithmetic lhs >> rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.shift_right_logical (::mlir::pphlo::ShiftRightLogicalOp)#

Shift right logical operator

Returns logical lhs >> rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.sign (::mlir::pphlo::SignOp)#

Sign operator

Returns sign(operand) element-wise, where

sign(x) = -1  : x < 0
        = 0   : x = 0
        = 1   : x > 0

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.slice (::mlir::pphlo::SliceOp)#

The dynamic shape version of SliceOp. Extracts a sub-array from the input array according to start_indices, limit_indices and strides. Expect start_indices/limit_indices/strides to be statically shaped and matching the rank of the input.

See https://www.tensorflow.org/xla/operation_semantics#slice

Traits: AlwaysSpeculatableImplTrait, SameOperandsAndResultElementType

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

start_indices

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

limit_indices

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

strides

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.sort (::mlir::pphlo::SortOp)#

Sort operator

Sorts the given operands at the given dimension with the given comparator.

See https://www.tensorflow.org/xla/operation_semantics#sort.

Traits: RecursiveMemoryEffects, SameOperandsAndResultShape

Attributes:#

Attribute

MLIR Type

Description

dimension

::mlir::IntegerAttr

64-bit signless integer attribute

is_stable

::mlir::BoolAttr

bool attribute

Operands:#

Operand

Description

operands

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.sqrt (::mlir::pphlo::SqrtOp)#

Square-root operator

Returns sqrt(operand) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public fixed-point type or secret fixed-point type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.subtract (::mlir::pphlo::SubtractOp)#

Subtraction operator

Returns lhs - rhs element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

rhs

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.tanh (::mlir::pphlo::TanhOp)#

Tanh operator

Returns tanh(operand) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions.

Traits: AlwaysSpeculatableImplTrait, Elementwise, SameOperandsAndResultShape, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

operand

statically shaped tensor of public fixed-point type or secret fixed-point type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of public fixed-point type or secret fixed-point type values

pphlo.transpose (::mlir::pphlo::TransposeOp)#

Transpose operator

Permutes the dimensions of operand according to the given permutation.

res_dimensions[i] = operand_dimensions[permutation[i]]

See https://www.tensorflow.org/xla/operation_semantics#transpose.

Traits: AlwaysSpeculatableImplTrait, SameOperandsAndResultElementType

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:#

Attribute

MLIR Type

Description

permutation

::mlir::DenseIntElementsAttr

64-bit signless integer elements attribute

Operands:#

Operand

Description

operand

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.while (::mlir::pphlo::WhileOp)#

While operator

Returns the result of executing a body function until the cond body returns true.

See https://www.tensorflow.org/xla/operation_semantics#while.

Traits: PPHLO_PairwiseSameOperandAndResultType, RecursiveMemoryEffects, SingleBlockImplicitTerminator

Operands:#

Operand

Description

args

statically shaped tensor of PPHlo public type or PPHlo secret type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values

pphlo.xor (::mlir::pphlo::XorOp)#

Logical xor

Returns logical_xor(lhs, rhs) element-wise.

See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.

Traits: AlwaysSpeculatableImplTrait, Commutative, Elementwise, SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:#

Operand

Description

lhs

statically shaped tensor of public integer type or secret integer type values

rhs

statically shaped tensor of public integer type or secret integer type values

Results:#

Result

Description

«unnamed»

statically shaped tensor of PPHlo public type or PPHlo secret type values