torch-mlir/test/npcomp-run-mlir/constant.mlir

10 lines
300 B
MLIR
Raw Normal View History

// RUN: npcomp-run-mlir -input %s \
// RUN: -invoke constant \
// RUN: -shared-libs=%npcomp_runtime_shlib 2>&1 \
// RUN: | FileCheck %s
// CHECK: output #0: dense<1.000000e+00> : tensor<f32>
func @constant() -> tensor<f32> {
%0 = constant dense<1.0> : tensor<f32>
return %0 : tensor<f32>
}