Skip to content

Commit

Permalink
Repo sync (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinxc authored Jun 27, 2024
1 parent 389327a commit 724d3d1
Show file tree
Hide file tree
Showing 72 changed files with 321 additions and 69 deletions.
1 change: 1 addition & 0 deletions libspu/compiler/codegen/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spu_cc_library(
srcs = ["codegen.cc"],
hdrs = ["codegen.h"],
deps = [
"//libspu:version",
"//libspu/dialect/pphlo/IR:dialect",
],
)
6 changes: 6 additions & 0 deletions libspu/compiler/codegen/codegen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@

#include "llvm/Support/raw_ostream.h"

#include "libspu/version.h"

namespace spu::compiler {

std::string CodeGen::doit(mlir::ModuleOp module) {
// Add ir version attr
module->setAttr("pphlo.version",
mlir::StringAttr::get(module->getContext(), getVersionStr()));
// Emit module
std::string ir_dump;
llvm::raw_string_ostream stream(ir_dump);
module.print(stream);
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/abs.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @abs_op_test_i64_i64_p() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/add.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @add_op_test_i8_i8_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/and.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @and_op_test_i8_i8_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/atan2.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @atan2_op_test_f64_f64_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/broadcast.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @broadcast_in_dim() {
%operand = pphlo.constant dense<[[1], [2], [3]]> : tensor<3x1xi64>
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/case.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @case_negative_index_default() {
%index = pphlo.constant dense<-1> : tensor<i32>
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/ceil.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @ceil_op_test_f16_f16_p() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/clamp.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @clamp_op_test_si64() {
%min = pphlo.constant dense<[1, 5, -5]> : tensor<3xi64>
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/concatenate.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @concatenate() {
%input0 = pphlo.constant dense<[[1, 2], [3, 4], [5, 6]]> : tensor<3x2xi64>
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/convert.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @convert_op_test_1() {
%0 = pphlo.constant dense<[0, 1, 8, -9, 0]> : tensor<5xi32>
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/convolution.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @main() {
%0 = pphlo.constant dense<[[[[ 1.0, 2.0, 3.0, 4.0],
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/cosine.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @cosine_op_test_f16_f16_p() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/divide.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @divide_op_test_i64_i64_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/dot_general.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @dot_general_op_test_si64() {
%lhs = pphlo.constant dense<[[[1, 2], [3, 4]],
Expand Down
23 changes: 22 additions & 1 deletion libspu/compiler/tests/interpret/dynamic_slice.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @dynamic_slice() {
%operand = pphlo.constant dense<[[1, 1, 1],
Expand All @@ -12,3 +14,22 @@ func.func @dynamic_slice() {
pphlo.custom_call @expect_eq (%result, %operand) : (tensor<3x3xi64>,tensor<3x3xi64>)->()
func.return
}

// -----

func.func @dynamic_slice() {
%operand = pphlo.constant dense<[[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]> : tensor<3x3xi64>
%i0 = pphlo.constant dense<1> : tensor<i64>
%start_indices0 = pphlo.convert %i0 : (tensor<i64>) -> tensor<!pphlo.secret<i64>>
%start_indices1 = pphlo.constant dense<1> : tensor<i64>
%r = "pphlo.dynamic_slice"(%operand, %start_indices0, %start_indices1) {
slice_sizes = array<i64: 2, 2>
} : (tensor<3x3xi64>, tensor<!pphlo.secret<i64>>, tensor<i64>) -> tensor<2x2x!pphlo.secret<i64>>
%result = pphlo.convert %r : (tensor<2x2x!pphlo.secret<i64>>) -> tensor<2x2xi64>
%expected = pphlo.constant dense<[[5, 6],
[8, 9]]> : tensor<2x2xi64>
pphlo.custom_call @expect_eq (%result, %expected) : (tensor<2x2xi64>,tensor<2x2xi64>)->()
func.return
}
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/dynamic_update_slice.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @dynamic_update_slice() {
%operand = pphlo.constant dense<[[1, 1, 1, 1],
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/equal.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @equal_op_test_i64_i1_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/exponential.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @exponential_op_test_f64_f64_p() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/exponential_minus_one.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @exponential_minus_one_op_test_f64_f64_p() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/floor.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @floor_op_test_f16_f16_p() {
Expand Down
10 changes: 9 additions & 1 deletion libspu/compiler/tests/interpret/generate_mlir_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,15 @@ def TestCase(inputs, expected, checker='expect_eq', tol=None):

with open(f"{test_name}.mlir", "w+") as f:
# emit run command
f.write("// RUN: spu-translate --interpret -split-input-file %s\n")
f.write(
"// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s\n"
)
f.write(
"// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s\n"
)
f.write(
"// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s\n"
)
f.write("// AUTO GENERATED, DO NOT EDIT\n\n")

# Emit cases
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/greater.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @greater_op_test_i64_i1_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/greater_equal.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @greater_equal_op_test_i64_i1_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/if.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @if_ops_true_branch() {
%pred = pphlo.constant dense<true> : tensor<i1>
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/iota.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @iota_op_test_si8_dim_0() {
%0 = pphlo.iota dim = 0 : tensor<3x4xi8>
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/less.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @less_op_test_i64_i1_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/less_equal.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @less_equal_op_test_i64_i1_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/log.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @log_op_test_f64_f64_p() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/log_plus_one.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @log_plus_one_op_test_f64_f64_p() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/logistic.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @logistic_op_test_f64_f64_p() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/maximum.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @maximum_op_test_i8_i8_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/minimum.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @minimum_op_test_i8_i8_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/multiply.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @multiply_op_test_i8_i8_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/negate.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @negate_op_test_i8_i8_p() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/not.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @not_op_test_i8_i8_p() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/not_equal.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @not_equal_op_test_i64_i1_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/or.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @or_op_test_i8_i8_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/pad.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @pad() {
%operand = pphlo.constant dense<[[0, 0, 0, 0],
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/popcnt.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @popcnt_op_test_i64_i64_p() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/power.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @power_op_test_i64_i64_pp() {
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/reduce.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @reduce() {
%input = pphlo.constant dense<[[0, 1, 2, 3, 4, 5]]> : tensor<1x6xi64>
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/reduce_window.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s

func.func @reduce_window() {
%input = pphlo.constant dense<[[1, 2], [3, 4], [5, 6]]> : tensor<3x2xi64>
Expand Down
4 changes: 3 additions & 1 deletion libspu/compiler/tests/interpret/reshape.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: spu-translate --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=1 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=2 --interpret -split-input-file %s
// RUN: spu-translate --protocol_kind=3 --interpret -split-input-file %s
// AUTO GENERATED, DO NOT EDIT

func.func @reshape_op_test_i32_i32_p() {
Expand Down
Loading

0 comments on commit 724d3d1

Please sign in to comment.