From df38d90a4700be336a396ffcc6420e1289ca8932 Mon Sep 17 00:00:00 2001 From: Sandeep Dasgupta Date: Fri, 23 Sep 2022 09:35:33 -0700 Subject: [PATCH] adding links to elaborative testing (#155) Adding hyperlinks in spec to test-files having elaborative tests. --- docs/spec_draft.md | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/docs/spec_draft.md b/docs/spec_draft.md index a461fc4180f..cd0053fb8fd 100644 --- a/docs/spec_draft.md +++ b/docs/spec_draft.md @@ -231,6 +231,8 @@ the IEEE-754 specification. // %result: [[6, 8], [10, 12]] ``` + [More Examples](../stablehlo/tests/interpret_add.mlir) + [Back to Ops](#index-of-documented-ops) ## stablehlo.and @@ -342,22 +344,12 @@ Produces a `result` tensor from a constant `value`. ### Examples ```mlir -%result = stablehlo.constant dense : tensor -// %result: true - -%result = stablehlo.constant dense<0> : tensor -// %result: 0 - %result = stablehlo.constant dense<[[0.0, 1.0], [2.0, 3.0]]> : tensor<2x2xf32> -// %result: [ -// [0.0, 1.0], -// [2.0, 3.0] -// ] - -%result = stablehlo.constant dense<[(0.0, 1.0), (2.0, 3.0)]> : tensor<2xcomplex> -// %result: [(0.0, 1.0), (2.0, 3.0)] +// %result: [[0.0, 1.0], [2.0, 3.0]] ``` + [More Examples](../stablehlo/tests/interpret_constant.mlir) + [Back to Ops](#index-of-documented-ops) ## stablehlo.cosine @@ -951,6 +943,8 @@ specification. Numeric precision is implementation-defined. // %result: [[0.0, 1.0], [0.0, -1.0]] ``` + [More Examples](../stablehlo/tests/interpret_sine.mlir) + [Back to Ops](#index-of-documented-ops) ## stablehlo.sqrt