Skip to content

Commit e2f0a2d

Browse files
committed
add new documentation to address pr concerns
1 parent fd63d4c commit e2f0a2d

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

clang/docs/LanguageExtensions.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,11 @@ The matrix type extension supports explicit casts. Implicit type conversion betw
10731073
i = static_cast<matrix_5_5<int>>(d);
10741074
}
10751075

1076+
The matrix type extension will support column and row major layouts. The flag
1077+
to change this behavior is `-fmatrix-default-layout` used like so
1078+
`-fmatrix-default-layout=column-major` for column major and like so
1079+
`-fmatrix-default-layout=row-major` for row major.
1080+
10761081
Half-Precision Floating Point
10771082
=============================
10781083

clang/docs/MatrixTypes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,11 @@ part of the draft specification.
287287
The elements of a value of a matrix type are laid out in column-major order
288288
without padding.
289289

290+
To change the default order to row major use the `-fmatrix-default-layout` flag.
291+
This flag supports two flag argument values either `column-major` or `row-major`
292+
used like so `-fmatrix-default-layout=column-major`.` This flag controls the
293+
memory layout of matrix types.
294+
290295
We propose to provide a Clang option to override this behavior and allow
291296
contraction of those operations (e.g. *-ffp-contract=matrix*).
292297

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ New Compiler Flags
316316
- New option ``-fsanitize-debug-trap-reasons=`` added to control emitting trap reasons into the debug info when compiling with trapping UBSan (e.g. ``-fsanitize-trap=undefined``).
317317
- New options for enabling allocation token instrumentation: ``-fsanitize=alloc-token``, ``-falloc-token-max=``, ``-fsanitize-alloc-token-fast-abi``, ``-fsanitize-alloc-token-extended``.
318318
- The ``-resource-dir`` option is now displayed in the list of options shown by ``--help``.
319+
- New option ``-fmatrix-default-layout`` added to control the memory layout of Clang matrix types. (e.g. ``-fmatrix-default-layout=column-major`` or ``-fmatrix-default-layout=row-major``).
319320

320321
Lanai Support
321322
^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)