dialect: arith+func

nl: Write a function `add` that takes two i32 values and returns their sum.

canonical_fn_name: add


nl: Write a function `mul` that multiplies two i64 values and returns their product.

canonical_fn_name: mul


nl: Write a function `addf` that takes two f32 values and returns their sum.

canonical_fn_name: addf


nl: Write a function that returns the constant integer 42 as an i32.


nl: Write a function that computes `(a + b) * c` on i32 inputs and returns the i32 result.


nl: Write a function that computes the bitwise AND of two i32 values.

canonical_fn_name: band


nl: Write a function that takes an i32 and returns it incremented by 1.

canonical_fn_name: inc


nl: Write a function that doubles an f32 value.

canonical_fn_name: dbl


nl: Write a function that computes x squared for an i32 x.

canonical_fn_name: square


nl: Write a function that computes x * x * x for an f32 x.

canonical_fn_name: cube


dialect: linalg+memref

nl: Write a function that fills a 1-D f32 memref with zeros.


nl: Write a function that fills a 2-D f32 memref with a given f32 value passed as a parameter.

canonical_fn_name: fp


nl: Write a function that fills a 1-D i32 memref with the integer constant 7.


nl: Write a function that copies a 1-D f32 memref into another 1-D f32 memref of the same shape.

s

init: fill


nl: Write a function that copies a 4x4xf32 static memref into another 4x4xf32 memref.


nl: linalg.add elementwise on two 1-D f32 memrefs

canonical_fn_name: ae

canonical_signature: (memref<?xf32>, memref<?xf32>, memref<?xf32>) -> ()


nl: linalg.mul elementwise on two 2-D f32 memrefs (2x2)

canonical_fn_name: me

canonical_signature: (memref<?x?xf32>, memref<?x?xf32>, memref<?x?xf32>) -> ()


nl: Write a function that performs matrix multiplication of two 2x2 f32 memrefs and writes the result into the output 2x2 f32 memref.

canonical_signature: (memref<2x2xf32>, memref<2x2xf32>, memref<2x2xf32>) -> ()


nl: linalg.exp elementwise on a 1-D f32 memref

canonical_fn_name: ee


nl: linalg.abs elementwise on a 1-D f32 memref

canonical_fn_name: ab


dialect: stablehlo

nl: Write a function that adds two 1-D f32 tensors of 16 elements using stablehlo.add.

canonical_fn_name: a

canonical_signature: (tensor<16xf32>, tensor<16xf32>) -> tensor<16xf32>


nl: Write a function that multiplies two 4x4 f32 tensors elementwise using stablehlo.multiply.

canonical_signature: (tensor<4x4xf32>, tensor<4x4xf32>) -> tensor<4x4xf32>


nl: Write a function that subtracts two 1-D i32 tensors of 16 elements using stablehlo.subtract.

canonical_fn_name: s

canonical_signature: (tensor<16xi32>, tensor<16xi32>) -> tensor<16xi32>


nl: Write a function that computes the elementwise absolute value of a 1-D f32 tensor.

canonical_signature: (tensor<16xf32>) -> tensor<16xf32>


nl: Write a function that computes the elementwise exponential of a 1-D f32 tensor.

canonical_fn_name: ex


nl: Write a function that transposes a 4x8 f32 tensor producing an 8x4 tensor.

canonical_fn_name: t

canonical_signature: (tensor<4x8xf32>) -> tensor<8x4xf32>


nl: Write a function that adds two 2x4 f32 tensors using stablehlo.add.

canonical_signature: (tensor<2x4xf32>, tensor<2x4xf32>) -> tensor<2x4xf32>


nl: Write a function that divides two 1-D f64 tensors of 8 elements using stablehlo.divide.

canonical_fn_name: d

canonical_signature: (tensor<8xf64>, tensor<8xf64>) -> tensor<8xf64>


nl: Write a function that performs a matmul of two f32 tensors via stablehlo.dot_general (lhs 4x8, rhs 8x4).

canonical_fn_name: dm

canonical_signature: (tensor<4x8xf32>, tensor<8x4xf32>) -> tensor<4x4xf32>


nl: Write a function that transposes a 2x3x4 f32 tensor with permutation [2, 0, 1] producing a 4x2x3 tensor.