@@ -15525,6 +15525,7 @@ The argument to this intrinsic must be a vector of floating-point values.
15525
15525
15526
15526
Syntax:
15527
15527
"""""""
15528
+ This is an overloaded intrinsic.
15528
15529
15529
15530
::
15530
15531
@@ -15549,17 +15550,20 @@ Matrix Intrinsics
15549
15550
-----------------
15550
15551
15551
15552
Operations on matrixes requiring shape information (like number of rows/columns
15552
- or the memory layout) can be expressed using the matrix intrinsics. Matrixes are
15553
- embedded in a flat vector and the intrinsics take the dimensions as arguments.
15554
- Currently column-major layout is assumed. The intrinsics support both integer
15555
- and floating point matrixes.
15553
+ or the memory layout) can be expressed using the matrix intrinsics. These
15554
+ intrinsics require matrix dimensions to be passed as immediate arguments, and
15555
+ matrixes are passed and returned as vectors. This means that for a ``R`` x
15556
+ ``C`` matrix, element ``i`` of column ``j`` is at index ``j * R + i`` in the
15557
+ corresponding vector, with indices starting at 0. Currently column-major layout
15558
+ is assumed. The intrinsics support both integer and floating point matrixes.
15556
15559
15557
15560
15558
15561
'``llvm.matrix.transpose.*``' Intrinsic
15559
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15562
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15560
15563
15561
15564
Syntax:
15562
15565
"""""""
15566
+ This is an overloaded intrinsic.
15563
15567
15564
15568
::
15565
15569
@@ -15568,21 +15572,24 @@ Syntax:
15568
15572
Overview:
15569
15573
"""""""""
15570
15574
15571
- The '``llvm.matrix.transpose.*``' intrinsic treats %In as containing a matrix
15572
- with <Rows> rows and <Cols> columns and returns the transposed matrix embedded in
15573
- the result vector.
15575
+ The '``llvm.matrix.transpose.*``' intrinsics treat %In as a <Rows> x <Cols> matrix
15576
+ and return the transposed matrix in the result vector.
15574
15577
15575
15578
Arguments:
15576
15579
""""""""""
15577
15580
15578
- The <Rows> and <Cols> arguments must be constant integers. The vector argument
15579
- %In and the returned vector must have <Rows> * <Cols> elements.
15581
+ First argument %In is vector that corresponds to a <Rows> x <Cols> matrix.
15582
+ Thus, arguments <Rows> and <Cols> correspond to the number of rows and columns,
15583
+ respectively, and must be positive, constant integers. The returned vector must
15584
+ have <Rows> * <Cols> elements, and have the same float or integer element type
15585
+ as %In.
15580
15586
15581
15587
'``llvm.matrix.multiply.*``' Intrinsic
15582
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15588
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15583
15589
15584
15590
Syntax:
15585
15591
"""""""
15592
+ This is an overloaded intrinsic.
15586
15593
15587
15594
::
15588
15595
@@ -15591,25 +15598,27 @@ Syntax:
15591
15598
Overview:
15592
15599
"""""""""
15593
15600
15594
- The '``llvm.matrix.multiply.*``' intrinsic treats %A as a matrix with <OuterRows>
15595
- rows and <Inner> columns, %B as a matrix with <Inner> rows and <OuterColumns>
15596
- columns and multiplies them. The result matrix is returned embedded in the
15597
- result vector.
15601
+ The '``llvm.matrix.multiply.*``' intrinsics treat %A as a <OuterRows> x <Inner>
15602
+ matrix, %B as a <Inner> x <OuterColumns> matrix, and multiplies them. The result
15603
+ matrix is returned in the result vector.
15598
15604
15599
15605
Arguments:
15600
15606
""""""""""
15601
15607
15602
- The <OuterRows>, <Inner> and <OuterColumns> arguments must be constant
15603
- integers. The vector argument %A must have <OuterRows> * <Inner> elements, %B
15604
- must have <Inner> * <OuterColumns> elements and the returned vector must have
15605
- <OuterRows> * <OuterColumns> elements.
15608
+ The first vector argument %A corresponds to a matrix with <OuterRows> * <Inner>
15609
+ elements, and the second argument %B to a matrix with <Inner> * <OuterColumns>
15610
+ elements. Arguments <OuterRows>, <Inner> and <OuterColumns> must be positive,
15611
+ constant integers. The returned vector must have <OuterRows> * <OuterColumns>
15612
+ elements. Vectors %A, %B, and the returned vector all have the same float or
15613
+ integer element type.
15606
15614
15607
15615
15608
15616
'``llvm.matrix.column.major.load.*``' Intrinsic
15609
15617
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15610
15618
15611
15619
Syntax:
15612
15620
"""""""
15621
+ This is an overloaded intrinsic.
15613
15622
15614
15623
::
15615
15624
@@ -15619,22 +15628,26 @@ Syntax:
15619
15628
Overview:
15620
15629
"""""""""
15621
15630
15622
- The '``llvm.matrix.column.major.load.*``' intrinsic loads a matrix with <Rows>
15623
- rows and <Cols> columns, using a stride of %Stride between columns. For two
15624
- consecutive columns A and B, %Stride refers to the distance (the number of
15625
- elements) between the start of column A and the start of column B. The result
15626
- matrix is returned embedded in the result vector. This allows for convenient
15627
- loading of sub matrixes. If <IsVolatile> is true, the intrinsic is considered
15628
- a :ref:`volatile memory access <volatile>`.
15629
-
15630
- If the %Ptr argument is known to be aligned to some boundary, this can be
15631
- specified as an attribute on the argument.
15631
+ The '``llvm.matrix.column.major.load.*``' intrinsics load a <Rows> x <Cols>
15632
+ matrix using a stride of %Stride to compute the start address of the different
15633
+ columns. This allows for convenient loading of sub matrixes. If <IsVolatile>
15634
+ is true, the intrinsic is considered a :ref:`volatile memory access
15635
+ <volatile>`. The result matrix is returned in the result vector. If the %Ptr
15636
+ argument is known to be aligned to some boundary, this can be specified as an
15637
+ attribute on the argument.
15632
15638
15633
15639
Arguments:
15634
15640
""""""""""
15635
15641
15636
- The <IsVolatile>, <Rows> and <Cols> arguments must be constant integers. The
15637
- returned vector must have <Rows> * <Cols> elements. %Stride must be >= <Rows>.
15642
+ The first argument %Ptr is a pointer type to the returned vector type, and
15643
+ correponds to the start address to load from. The second argument %Stride is a
15644
+ postive, constant integer with %Stride ``>=`` <Rows>. %Stride is used to compute
15645
+ the column memory addresses. I.e., for a column ``C``, its start memory
15646
+ addresses is calculated with %Ptr + ``C`` * %Stride. The third Argument
15647
+ <IsVolatile> is a boolean value. The fourth and fifth arguments, <Rows> and
15648
+ <Cols>, correspond to the number of rows and columns, respectively, and must be
15649
+ positive, constant integers. The returned vector must have <Rows> * <Cols>
15650
+ elements.
15638
15651
15639
15652
The :ref:`align <attr_align>` parameter attribute can be provided
15640
15653
for the %Ptr arguments.
@@ -15654,21 +15667,26 @@ Syntax:
15654
15667
Overview:
15655
15668
"""""""""
15656
15669
15657
- The '``llvm.matrix.column.major.store.*``' intrinsic stores the matrix with
15658
- <Rows> rows and <Cols> columns embedded in %In, using a stride of %Stride
15659
- between columns. For two consecutive columns A and B, %Stride refers to the
15660
- distance (the number of elements) between the start of column A and the start
15661
- of column B. If <IsVolatile> is true, the intrinsic is considered a
15662
- :ref:`volatile memory access <volatile>`.
15670
+ The '``llvm.matrix.column.major.store.*``' intrinsics store the <Rows> x <Cols>
15671
+ matrix in %In to memory using a stride of %Stride between columns. If
15672
+ <IsVolatile> is true, the intrinsic is considered a :ref:`volatile memory
15673
+ access <volatile>`.
15663
15674
15664
15675
If the %Ptr argument is known to be aligned to some boundary, this can be
15665
15676
specified as an attribute on the argument.
15666
15677
15667
15678
Arguments:
15668
15679
""""""""""
15669
15680
15670
- The <IsVolatile>, <Rows>, <Cols> arguments must be constant integers. The
15671
- vector argument %In must have <Rows> * <Cols> elements. %Stride must be >= <Rows>.
15681
+ The first argument %In is a vector that corresponds to a <Rows> x <Cols> matrix
15682
+ to be stored to memory. The second argument %Ptr is a pointer to the vector
15683
+ type of %In, and is the start address of the matrix in memory. The third
15684
+ argument %Stride is a positive, constant integer with %Stride ``>=`` <Rows>.
15685
+ %Stride is used to compute the column memory addresses. I.e., for a column
15686
+ ``C``, its start memory addresses is calculated with %Ptr + ``C`` * %Stride.
15687
+ The fourth argument <IsVolatile> is a boolean value. The arguments <Rows> and
15688
+ <Cols> correspond to the number of rows and columns, respectively, and must be
15689
+ positive, constant integers.
15672
15690
15673
15691
The :ref:`align <attr_align>` parameter attribute can be provided
15674
15692
for the %Ptr arguments.
0 commit comments