Skip to content

Commit

Permalink
Make operand data type and rank validation table-driven (#657)
Browse files Browse the repository at this point in the history
* Make operand data type and rank validation table-driven

Improve readability of input operand data type and rank by introducing
a table within each method definition that outlines the restrictions
for positional arguments and options. Steps are updated to reference
the table columns.

* fix broken link

* typo fix

* Varioius fixes

- gemm(): Fix ranks in table, align phrasing.
- gru(): Align phrasing.
- lstm(): Don't inline rank of 3, reference table.
- matmul(): Align phrasing.
- prelu(): Fix punctation.
- triangular(): Add table, use for rank validation.
- where(): Align phrasing.

* Remove redundant rank validation, when shape is validated

* Sync with updated where() param names

* Fix link for linear()

* Close tags for TR/TH/TD

* Missing prelu()'s slope arg

* fix links (yay lint)

* Reorder steps to minimize diff

* Apply suggestions from code review

"input" -> "same as input"

Co-authored-by: Ningxin Hu <[email protected]>

* scope 'allowed' links

* add table captions; link steps to tables

* Add tables for all ops

* Allow allowed ranks to be a range

* elementwise-logical and reduction types are given in op steps

* align spelling of 'element-wise binary' with rest of spec

* restore prelu's slope's rank to 'any'

* Apply suggestions from code review

Fix copy/pasta of {{input}} for other params

Co-authored-by: Dwayne Robinson <[email protected]>

---------

Co-authored-by: Ningxin Hu <[email protected]>
Co-authored-by: Dwayne Robinson <[email protected]>
  • Loading branch information
3 people authored Nov 15, 2024
1 parent 9a11f60 commit c237cf1
Showing 1 changed file with 1,013 additions and 109 deletions.
Loading

0 comments on commit c237cf1

Please sign in to comment.