Skip to content

Commit

Permalink
adding links to elaborative testing (#155)
Browse files Browse the repository at this point in the history
Adding hyperlinks in spec to test-files having elaborative tests.
  • Loading branch information
sdasgup3 authored Sep 23, 2022
1 parent ee50580 commit df38d90
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions docs/spec_draft.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -342,22 +344,12 @@ Produces a `result` tensor from a constant `value`.
### Examples

```mlir
%result = stablehlo.constant dense<true> : tensor<pred>
// %result: true
%result = stablehlo.constant dense<0> : tensor<i32>
// %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<f32>>
// %result: [(0.0, 1.0), (2.0, 3.0)]
// %result: [[0.0, 1.0], [2.0, 3.0]]
```

&nbsp;[More Examples](../stablehlo/tests/interpret_constant.mlir)

[Back to Ops](#index-of-documented-ops)

## stablehlo.cosine
Expand Down Expand Up @@ -951,6 +943,8 @@ specification. Numeric precision is implementation-defined.
// %result: [[0.0, 1.0], [0.0, -1.0]]
```

&nbsp;[More Examples](../stablehlo/tests/interpret_sine.mlir)

[Back to Ops](#index-of-documented-ops)

## stablehlo.sqrt
Expand Down

0 comments on commit df38d90

Please sign in to comment.