Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- venv/lib/python3.10/site-packages/Deprecated-1.2.18.dist-info/INSTALLER +1 -0
- venv/lib/python3.10/site-packages/Deprecated-1.2.18.dist-info/LICENSE.rst +21 -0
- venv/lib/python3.10/site-packages/Deprecated-1.2.18.dist-info/METADATA +195 -0
- venv/lib/python3.10/site-packages/Deprecated-1.2.18.dist-info/RECORD +12 -0
- venv/lib/python3.10/site-packages/Deprecated-1.2.18.dist-info/WHEEL +6 -0
- venv/lib/python3.10/site-packages/Deprecated-1.2.18.dist-info/top_level.txt +1 -0
- venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/INSTALLER +1 -0
- venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/LICENSE +201 -0
- venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/METADATA +1377 -0
- venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/RECORD +166 -0
- venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/REQUESTED +0 -0
- venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/WHEEL +5 -0
- venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/entry_points.txt +2 -0
- venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/top_level.txt +1 -0
- venv/lib/python3.10/site-packages/apiclient/__init__.py +27 -0
- venv/lib/python3.10/site-packages/apiclient/__pycache__/__init__.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/ISSUE_TEMPLATE/bug_report.md +23 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/ISSUE_TEMPLATE/documentation_request.md +35 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/ISSUE_TEMPLATE/submit_question.md +10 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/workflows/labeler.yml +11 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/workflows/new-issues-to-triage-projects.yml +35 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/workflows/stale.yml +57 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.gitignore +2 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.gitmodules +0 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/CHANGELOG.md +377 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/CITATION.cff +112 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/CMakeLists.txt +923 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/CONTRIBUTORS.md +83 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/CUDA.cmake +371 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/Doxyfile +0 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/LICENSE.txt +27 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/PUBLICATIONS.md +40 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/README.md +570 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/bin2hex.cmake +26 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/CTestTestfile.configure.cmake +14 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/CTestTestfile.test.configure.cmake +15 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/NvidiaCutlassConfig.cmake +12 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/NvidiaCutlassPackageConfig.cmake +14 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/googletest.cmake +23 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/nop.cu +49 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/version.h.in +38 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cuBLAS.cmake +152 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cuDNN.cmake +112 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/docs/arch_2mma__sm50_8h_source.html +129 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/docs/arch_2mma__sm60_8h__dep__incl.md5 +1 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/docs/array_8h_source.html +0 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/docs/array__subbyte_8h__dep__incl.md5 +1 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/docs/array__subbyte_8h__incl.md5 +1 -0
- venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/docs/classcutlass_1_1AlignedArray__inherit__graph.md5 +1 -0
venv/lib/python3.10/site-packages/Deprecated-1.2.18.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
venv/lib/python3.10/site-packages/Deprecated-1.2.18.dist-info/LICENSE.rst
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The MIT License (MIT)
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2017 Laurent LAPORTE
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
venv/lib/python3.10/site-packages/Deprecated-1.2.18.dist-info/METADATA
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.2
|
| 2 |
+
Name: Deprecated
|
| 3 |
+
Version: 1.2.18
|
| 4 |
+
Summary: Python @deprecated decorator to deprecate old python classes, functions or methods.
|
| 5 |
+
Home-page: https://github.com/laurent-laporte-pro/deprecated
|
| 6 |
+
Author: Laurent LAPORTE
|
| 7 |
+
Author-email: laurent.laporte.pro@gmail.com
|
| 8 |
+
License: MIT
|
| 9 |
+
Project-URL: Documentation, https://deprecated.readthedocs.io/en/latest/
|
| 10 |
+
Project-URL: Source, https://github.com/laurent-laporte-pro/deprecated
|
| 11 |
+
Project-URL: Bug Tracker, https://github.com/laurent-laporte-pro/deprecated/issues
|
| 12 |
+
Keywords: deprecate,deprecated,deprecation,warning,warn,decorator
|
| 13 |
+
Platform: any
|
| 14 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 15 |
+
Classifier: Environment :: Web Environment
|
| 16 |
+
Classifier: Intended Audience :: Developers
|
| 17 |
+
Classifier: License :: OSI Approved :: MIT License
|
| 18 |
+
Classifier: Operating System :: OS Independent
|
| 19 |
+
Classifier: Programming Language :: Python
|
| 20 |
+
Classifier: Programming Language :: Python :: 2
|
| 21 |
+
Classifier: Programming Language :: Python :: 2.7
|
| 22 |
+
Classifier: Programming Language :: Python :: 3
|
| 23 |
+
Classifier: Programming Language :: Python :: 3.4
|
| 24 |
+
Classifier: Programming Language :: Python :: 3.5
|
| 25 |
+
Classifier: Programming Language :: Python :: 3.6
|
| 26 |
+
Classifier: Programming Language :: Python :: 3.7
|
| 27 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 28 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 29 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 30 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 31 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 32 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
| 33 |
+
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
|
| 34 |
+
Description-Content-Type: text/x-rst
|
| 35 |
+
License-File: LICENSE.rst
|
| 36 |
+
Requires-Dist: wrapt<2,>=1.10
|
| 37 |
+
Provides-Extra: dev
|
| 38 |
+
Requires-Dist: tox; extra == "dev"
|
| 39 |
+
Requires-Dist: PyTest; extra == "dev"
|
| 40 |
+
Requires-Dist: PyTest-Cov; extra == "dev"
|
| 41 |
+
Requires-Dist: bump2version<1; extra == "dev"
|
| 42 |
+
Requires-Dist: setuptools; python_version >= "3.12" and extra == "dev"
|
| 43 |
+
Dynamic: author
|
| 44 |
+
Dynamic: author-email
|
| 45 |
+
Dynamic: classifier
|
| 46 |
+
Dynamic: description
|
| 47 |
+
Dynamic: description-content-type
|
| 48 |
+
Dynamic: home-page
|
| 49 |
+
Dynamic: keywords
|
| 50 |
+
Dynamic: license
|
| 51 |
+
Dynamic: platform
|
| 52 |
+
Dynamic: project-url
|
| 53 |
+
Dynamic: provides-extra
|
| 54 |
+
Dynamic: requires-dist
|
| 55 |
+
Dynamic: requires-python
|
| 56 |
+
Dynamic: summary
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
Deprecated Library
|
| 60 |
+
------------------
|
| 61 |
+
|
| 62 |
+
Deprecated is Easy to Use
|
| 63 |
+
`````````````````````````
|
| 64 |
+
|
| 65 |
+
If you need to mark a function or a method as deprecated,
|
| 66 |
+
you can use the ``@deprecated`` decorator:
|
| 67 |
+
|
| 68 |
+
Save in a hello.py:
|
| 69 |
+
|
| 70 |
+
.. code:: python
|
| 71 |
+
|
| 72 |
+
from deprecated import deprecated
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
@deprecated(version='1.2.1', reason="You should use another function")
|
| 76 |
+
def some_old_function(x, y):
|
| 77 |
+
return x + y
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
class SomeClass(object):
|
| 81 |
+
@deprecated(version='1.3.0', reason="This method is deprecated")
|
| 82 |
+
def some_old_method(self, x, y):
|
| 83 |
+
return x + y
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
some_old_function(12, 34)
|
| 87 |
+
obj = SomeClass()
|
| 88 |
+
obj.some_old_method(5, 8)
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
And Easy to Setup
|
| 92 |
+
`````````````````
|
| 93 |
+
|
| 94 |
+
And run it:
|
| 95 |
+
|
| 96 |
+
.. code:: bash
|
| 97 |
+
|
| 98 |
+
$ pip install Deprecated
|
| 99 |
+
$ python hello.py
|
| 100 |
+
hello.py:15: DeprecationWarning: Call to deprecated function (or staticmethod) some_old_function.
|
| 101 |
+
(You should use another function) -- Deprecated since version 1.2.0.
|
| 102 |
+
some_old_function(12, 34)
|
| 103 |
+
hello.py:17: DeprecationWarning: Call to deprecated method some_old_method.
|
| 104 |
+
(This method is deprecated) -- Deprecated since version 1.3.0.
|
| 105 |
+
obj.some_old_method(5, 8)
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
You can document your code
|
| 109 |
+
``````````````````````````
|
| 110 |
+
|
| 111 |
+
Have you ever wonder how to document that some functions, classes, methods, etc. are deprecated?
|
| 112 |
+
This is now possible with the integrated Sphinx directives:
|
| 113 |
+
|
| 114 |
+
For instance, in hello_sphinx.py:
|
| 115 |
+
|
| 116 |
+
.. code:: python
|
| 117 |
+
|
| 118 |
+
from deprecated.sphinx import deprecated
|
| 119 |
+
from deprecated.sphinx import versionadded
|
| 120 |
+
from deprecated.sphinx import versionchanged
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
@versionadded(version='1.0', reason="This function is new")
|
| 124 |
+
def function_one():
|
| 125 |
+
'''This is the function one'''
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
@versionchanged(version='1.0', reason="This function is modified")
|
| 129 |
+
def function_two():
|
| 130 |
+
'''This is the function two'''
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
@deprecated(version='1.0', reason="This function will be removed soon")
|
| 134 |
+
def function_three():
|
| 135 |
+
'''This is the function three'''
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
function_one()
|
| 139 |
+
function_two()
|
| 140 |
+
function_three() # warns
|
| 141 |
+
|
| 142 |
+
help(function_one)
|
| 143 |
+
help(function_two)
|
| 144 |
+
help(function_three)
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
The result it immediate
|
| 148 |
+
```````````````````````
|
| 149 |
+
|
| 150 |
+
Run it:
|
| 151 |
+
|
| 152 |
+
.. code:: bash
|
| 153 |
+
|
| 154 |
+
$ python hello_sphinx.py
|
| 155 |
+
|
| 156 |
+
hello_sphinx.py:23: DeprecationWarning: Call to deprecated function (or staticmethod) function_three.
|
| 157 |
+
(This function will be removed soon) -- Deprecated since version 1.0.
|
| 158 |
+
function_three() # warns
|
| 159 |
+
|
| 160 |
+
Help on function function_one in module __main__:
|
| 161 |
+
|
| 162 |
+
function_one()
|
| 163 |
+
This is the function one
|
| 164 |
+
|
| 165 |
+
.. versionadded:: 1.0
|
| 166 |
+
This function is new
|
| 167 |
+
|
| 168 |
+
Help on function function_two in module __main__:
|
| 169 |
+
|
| 170 |
+
function_two()
|
| 171 |
+
This is the function two
|
| 172 |
+
|
| 173 |
+
.. versionchanged:: 1.0
|
| 174 |
+
This function is modified
|
| 175 |
+
|
| 176 |
+
Help on function function_three in module __main__:
|
| 177 |
+
|
| 178 |
+
function_three()
|
| 179 |
+
This is the function three
|
| 180 |
+
|
| 181 |
+
.. deprecated:: 1.0
|
| 182 |
+
This function will be removed soon
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
Links
|
| 186 |
+
`````
|
| 187 |
+
|
| 188 |
+
* `Python package index (PyPi) <https://pypi.org/project/Deprecated/>`_
|
| 189 |
+
* `GitHub website <https://github.com/laurent-laporte-pro/deprecated>`_
|
| 190 |
+
* `Read The Docs <https://readthedocs.org/projects/deprecated>`_
|
| 191 |
+
* `EBook on Lulu.com <http://www.lulu.com/commerce/index.php?fBuyContent=21305117>`_
|
| 192 |
+
* `StackOverFlow Q&A <https://stackoverflow.com/a/40301488/1513933>`_
|
| 193 |
+
* `Development version
|
| 194 |
+
<https://github.com/laurent-laporte-pro/deprecated/zipball/master#egg=Deprecated-dev>`_
|
| 195 |
+
|
venv/lib/python3.10/site-packages/Deprecated-1.2.18.dist-info/RECORD
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Deprecated-1.2.18.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 2 |
+
Deprecated-1.2.18.dist-info/LICENSE.rst,sha256=HoPt0VvkGbXVveNy4yXlJ_9PmRX1SOfHUxS0H2aZ6Dw,1081
|
| 3 |
+
Deprecated-1.2.18.dist-info/METADATA,sha256=4CrUw5Bl8_NsBuZYe0Nw-mIwQnVpT1CnmBYU9BqOuq8,5725
|
| 4 |
+
Deprecated-1.2.18.dist-info/RECORD,,
|
| 5 |
+
Deprecated-1.2.18.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
|
| 6 |
+
Deprecated-1.2.18.dist-info/top_level.txt,sha256=nHbOYawKPQQE5lQl-toUB1JBRJjUyn_m_Mb8RVJ0RjA,11
|
| 7 |
+
deprecated/__init__.py,sha256=yZNbmDKXF4PLtp_Ikdb_9ObJLkHuFSUHvqidFTKKGFM,351
|
| 8 |
+
deprecated/__pycache__/__init__.cpython-310.pyc,,
|
| 9 |
+
deprecated/__pycache__/classic.cpython-310.pyc,,
|
| 10 |
+
deprecated/__pycache__/sphinx.cpython-310.pyc,,
|
| 11 |
+
deprecated/classic.py,sha256=7WXOt4Vf1NhrUznm8ypjS50CMyAdZwrGT58Lhb8fW14,10609
|
| 12 |
+
deprecated/sphinx.py,sha256=cOKnXbDyFAwDr5O7HBEpgQrx-J-qfp57sfdK_LabDxs,11109
|
venv/lib/python3.10/site-packages/Deprecated-1.2.18.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: setuptools (75.8.0)
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py2-none-any
|
| 5 |
+
Tag: py3-none-any
|
| 6 |
+
|
venv/lib/python3.10/site-packages/Deprecated-1.2.18.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
deprecated
|
venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright 2023 Yann Dubois and Xuechen Li and Rohan Taori and Tianyi Zhang and Ishaan Gulrajani
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|
venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/METADATA
ADDED
|
@@ -0,0 +1,1377 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: alpaca-eval
|
| 3 |
+
Version: 0.2.6
|
| 4 |
+
Summary: AlpacaEval : An Automatic Evaluator of Instruction-following Models
|
| 5 |
+
Author: The Alpaca Team
|
| 6 |
+
Classifier: Intended Audience :: Developers
|
| 7 |
+
Classifier: Intended Audience :: Education
|
| 8 |
+
Classifier: Intended Audience :: Science/Research
|
| 9 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
| 10 |
+
Classifier: Operating System :: OS Independent
|
| 11 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 12 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 13 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 14 |
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
| 15 |
+
Requires-Python: >=3.10
|
| 16 |
+
Description-Content-Type: text/markdown
|
| 17 |
+
License-File: LICENSE
|
| 18 |
+
Requires-Dist: python-dotenv
|
| 19 |
+
Requires-Dist: datasets
|
| 20 |
+
Requires-Dist: openai
|
| 21 |
+
Requires-Dist: pandas
|
| 22 |
+
Requires-Dist: tiktoken (>=0.3.2)
|
| 23 |
+
Requires-Dist: fire
|
| 24 |
+
Provides-Extra: all
|
| 25 |
+
Requires-Dist: accelerate ; extra == 'all'
|
| 26 |
+
Requires-Dist: transformers ; extra == 'all'
|
| 27 |
+
Requires-Dist: bitsandbytes ; extra == 'all'
|
| 28 |
+
Requires-Dist: xformers ; extra == 'all'
|
| 29 |
+
Requires-Dist: peft ; extra == 'all'
|
| 30 |
+
Requires-Dist: optimum ; extra == 'all'
|
| 31 |
+
Requires-Dist: scipy ; extra == 'all'
|
| 32 |
+
Requires-Dist: einops ; extra == 'all'
|
| 33 |
+
Requires-Dist: anthropic (>=0.3.3) ; extra == 'all'
|
| 34 |
+
Requires-Dist: huggingface-hub ; extra == 'all'
|
| 35 |
+
Requires-Dist: cohere ; extra == 'all'
|
| 36 |
+
Requires-Dist: replicate ; extra == 'all'
|
| 37 |
+
Requires-Dist: seaborn ; extra == 'all'
|
| 38 |
+
Requires-Dist: matplotlib ; extra == 'all'
|
| 39 |
+
Requires-Dist: jupyterlab ; extra == 'all'
|
| 40 |
+
Requires-Dist: pre-commit (>=3.2.0) ; extra == 'all'
|
| 41 |
+
Requires-Dist: black (>=23.1.0) ; extra == 'all'
|
| 42 |
+
Requires-Dist: isort ; extra == 'all'
|
| 43 |
+
Requires-Dist: pytest ; extra == 'all'
|
| 44 |
+
Requires-Dist: pytest-mock ; extra == 'all'
|
| 45 |
+
Requires-Dist: pytest-skip-slow ; extra == 'all'
|
| 46 |
+
Requires-Dist: python-dotenv ; extra == 'all'
|
| 47 |
+
Provides-Extra: analysis
|
| 48 |
+
Requires-Dist: seaborn ; extra == 'analysis'
|
| 49 |
+
Requires-Dist: matplotlib ; extra == 'analysis'
|
| 50 |
+
Requires-Dist: jupyterlab ; extra == 'analysis'
|
| 51 |
+
Provides-Extra: api
|
| 52 |
+
Requires-Dist: anthropic (>=0.3.3) ; extra == 'api'
|
| 53 |
+
Requires-Dist: huggingface-hub ; extra == 'api'
|
| 54 |
+
Requires-Dist: cohere ; extra == 'api'
|
| 55 |
+
Requires-Dist: replicate ; extra == 'api'
|
| 56 |
+
Provides-Extra: dev
|
| 57 |
+
Requires-Dist: pre-commit (>=3.2.0) ; extra == 'dev'
|
| 58 |
+
Requires-Dist: black (>=23.1.0) ; extra == 'dev'
|
| 59 |
+
Requires-Dist: isort ; extra == 'dev'
|
| 60 |
+
Requires-Dist: pytest ; extra == 'dev'
|
| 61 |
+
Requires-Dist: pytest-mock ; extra == 'dev'
|
| 62 |
+
Requires-Dist: pytest-skip-slow ; extra == 'dev'
|
| 63 |
+
Requires-Dist: python-dotenv ; extra == 'dev'
|
| 64 |
+
Provides-Extra: local
|
| 65 |
+
Requires-Dist: accelerate ; extra == 'local'
|
| 66 |
+
Requires-Dist: transformers ; extra == 'local'
|
| 67 |
+
Requires-Dist: bitsandbytes ; extra == 'local'
|
| 68 |
+
Requires-Dist: xformers ; extra == 'local'
|
| 69 |
+
Requires-Dist: peft ; extra == 'local'
|
| 70 |
+
Requires-Dist: optimum ; extra == 'local'
|
| 71 |
+
Requires-Dist: scipy ; extra == 'local'
|
| 72 |
+
Requires-Dist: einops ; extra == 'local'
|
| 73 |
+
|
| 74 |
+
# <a href="https://tatsu-lab.github.io/alpaca_eval/" target="_blank"><img src="https://raw.githubusercontent.com/tatsu-lab/alpaca_eval/main/docs/AlpacaFarm_small.png" width="35"></a> [AlpacaEval](https://tatsu-lab.github.io/alpaca_eval/) : An Automatic Evaluator for Instruction-following Language Models
|
| 75 |
+
|
| 76 |
+
[](https://github.com/tatsu-lab/alpaca_farm/blob/main/LICENSE)
|
| 77 |
+
[](https://github.com/tatsu-lab/alpaca_farm/blob/main/DATA_LICENSE)
|
| 78 |
+
[](https://www.python.org/downloads/release/python-3100/)
|
| 79 |
+
[](https://discord.gg/GJMxJSVZZM)
|
| 80 |
+
|
| 81 |
+
Evaluation of instruction-following models (e.g., ChatGPT) typically requires human interactions. This is
|
| 82 |
+
time-consuming, expensive, and hard to replicate. AlpacaEval in an LLM-based automatic evaluation that is fast, cheap,
|
| 83 |
+
replicable, and validated against 20K human annotations.
|
| 84 |
+
It is particularly useful for model development.
|
| 85 |
+
Although we improved over prior automatic evaluation pipelines, there are still fundamental [limitations](#limitations) like the preference for longer outputs.
|
| 86 |
+
AlpacaEval provides the following:
|
| 87 |
+
|
| 88 |
+
- [**Leaderboard**](https://tatsu-lab.github.io/alpaca_eval/): a leaderboard of common models on the AlpacaEval
|
| 89 |
+
evaluation set. **Caution**: Automatic evaluator (e.g. GPT4) may be biased towards models that generate longer outputs and/or that were fine-tuned on the model underlying the evaluator (e.g. GPT4).
|
| 90 |
+
- [**Automatic evaluator**](#evaluators): an automatic evaluator that has high agreement with humans (validated on 20K
|
| 91 |
+
annotations). We evaluate a
|
| 92 |
+
model by
|
| 93 |
+
measuring the fraction of times an powerful LLM (e.g. GPT 4 or Claude or ChatGPT) prefers the outputs from that model
|
| 94 |
+
over
|
| 95 |
+
outputs from a reference model. Our evaluators enable caching and output randomization by default.
|
| 96 |
+
- [**Toolkit for building automatic evaluators**](#analysis): a simple interface for
|
| 97 |
+
building advanced automatic evaluators (e.g. with caching, batching, or multi-annotators) and analyzing them (quality,
|
| 98 |
+
price, speed, statistical power, bias, variance etc).
|
| 99 |
+
- [**Human evaluation data**](#data-release): 20K human preferences between a given and reference model
|
| 100 |
+
on the [AlpacaFarm](https://github.com/tatsu-lab/alpaca_farm/tree/main)
|
| 101 |
+
evaluation set. 2.5K of these are cross-annotations (4 humans annotating the same 650 examples).
|
| 102 |
+
- [**AlpacaEval dataset**](#data-release): a simplification
|
| 103 |
+
of [AlpacaFarm's](https://github.com/tatsu-lab/alpaca_farm/tree/main) evaluation set, where "instructions" and "
|
| 104 |
+
inputs" are merged
|
| 105 |
+
into one field, and reference outputs are longer.
|
| 106 |
+
|
| 107 |
+
**When to use AlpacaEval?** Our automatic evaluator is a quick and cheap proxy for human evaluation of simple
|
| 108 |
+
instruction-following tasks.
|
| 109 |
+
It is useful if you
|
| 110 |
+
have to run many evaluations quickly, e.g., during model development.
|
| 111 |
+
|
| 112 |
+
**When not to use AlpacaEval?**
|
| 113 |
+
As any other automatic evaluator, AlpacaEval should **not replace human evaluation in
|
| 114 |
+
high-stake decision-making**, e.g., to decide on model release. In particular, AlpacaEval is limited by the fact
|
| 115 |
+
that (1) the instructions in the eval set might not be representative of advanced usage of LLMs; (2) automatic
|
| 116 |
+
evaluators may have biases such as favoring style over
|
| 117 |
+
factuality of the answer; and (3) AlpacaEval does not measure the risks that a model could cause.
|
| 118 |
+
Details in [limitations](#limitations).
|
| 119 |
+
|
| 120 |
+
<details open>
|
| 121 |
+
<summary><b>Table of Contents</b></summary>
|
| 122 |
+
|
| 123 |
+
1. [Quick Start](#quick-start)
|
| 124 |
+
2. [Leaderboards and how to interpret them](#leaderboards-and-how-to-interpret-them)
|
| 125 |
+
- [Models](#models)
|
| 126 |
+
- [Evaluators](#evaluators)
|
| 127 |
+
3. [Use-cases](#use-cases)
|
| 128 |
+
- [Evaluating a model](#evaluating-a-model)
|
| 129 |
+
- [Making a new leaderboard](#making-a-new-leaderboard)
|
| 130 |
+
- [Making a new evaluator](#making-a-new-evaluator)
|
| 131 |
+
4. [Analysis](#additional-analysis-and-plots)
|
| 132 |
+
- [Analyzing an evaluator](#analyzing-an-evaluator)
|
| 133 |
+
- [Analyzing an eval set](#analyzing-an-eval-set)
|
| 134 |
+
5. [Contributing](#contributing)
|
| 135 |
+
- [Contributing a model](#contributing-a-model)
|
| 136 |
+
- [Contributing an evaluator](#contributing-an-evaluator)
|
| 137 |
+
- [Contributing an eval set](#contributing-an-eval-set)
|
| 138 |
+
6. [Limitations](#limitations)
|
| 139 |
+
7. [Citation](#citation)
|
| 140 |
+
8. [Additional information](#additional-information)
|
| 141 |
+
- [Data Release](#data-release)
|
| 142 |
+
- [Differences with AlpacaFarm](#differences-with-alpacafarm)
|
| 143 |
+
- [Related work](#related-work)
|
| 144 |
+
- [Major updates](#major-updates)
|
| 145 |
+
|
| 146 |
+
</details>
|
| 147 |
+
|
| 148 |
+
# Quick Start
|
| 149 |
+
|
| 150 |
+
To install the stable release, run
|
| 151 |
+
|
| 152 |
+
```bash
|
| 153 |
+
pip install alpaca-eval
|
| 154 |
+
```
|
| 155 |
+
|
| 156 |
+
To install the nightly version, run
|
| 157 |
+
|
| 158 |
+
```bash
|
| 159 |
+
pip install git+https://github.com/tatsu-lab/alpaca_eval
|
| 160 |
+
```
|
| 161 |
+
|
| 162 |
+
Then you can use it as follows:
|
| 163 |
+
|
| 164 |
+
```bash
|
| 165 |
+
export OPENAI_API_KEY=<your_api_key>
|
| 166 |
+
export OPENAI_ORGANIZATION_IDS=<your_organization_id> # Optional; if not set, this will be your default org id.
|
| 167 |
+
alpaca_eval --model_outputs 'example/outputs.json'
|
| 168 |
+
```
|
| 169 |
+
|
| 170 |
+
This will print the leaderboard to the console, and save both the leaderboard and the annotations to the same directory as the `model_outputs` file. Important parameters are the following:
|
| 171 |
+
|
| 172 |
+
- **model_outputs** : A path to a json file for the outputs of the model to add to the leaderboard. Each dictionary
|
| 173 |
+
should
|
| 174 |
+
contain the keys `instruction` and `output`.
|
| 175 |
+
- **annotators_config**: This is the annotator to use (e.g., `alpaca_eval_gpt4` or `claude`
|
| 176 |
+
or `chatgpt_fn`). `alpaca_eval_gpt4` (
|
| 177 |
+
default) has the
|
| 178 |
+
highest agreement rate with our human annotation data. `claude` has a decent agreement and is free for
|
| 179 |
+
academics. `chatgpt_fn` is the worst of the three, but is available to everyone, cheap, and has 2x larger context
|
| 180 |
+
window (16K tokens). For a comparison of annotators see [here](#evaluators).
|
| 181 |
+
- **reference_outputs**: The outputs of the reference model. Same format as `model_outputs`. By default, this
|
| 182 |
+
is `text-davinci003` outputs on
|
| 183 |
+
AlpacaEval dataset.
|
| 184 |
+
- **output_path**: Path for saving annotations and leaderboard.
|
| 185 |
+
|
| 186 |
+
If you don't have the model outputs, you can
|
| 187 |
+
use [`evaluate_from_model`](https://github.com/tatsu-lab/alpaca_eval/tree/main#evaluating-a-model) and
|
| 188 |
+
pass a local path or a name of a
|
| 189 |
+
HuggingFace
|
| 190 |
+
model, or a model from a standard API (OpenAI, Anthropic, Cohere). Other commands:
|
| 191 |
+
|
| 192 |
+
<details open>
|
| 193 |
+
<summary><code>>>> alpaca_eval -- --help</code></summary>
|
| 194 |
+
|
| 195 |
+
```
|
| 196 |
+
SYNOPSIS
|
| 197 |
+
alpaca_eval COMMAND
|
| 198 |
+
|
| 199 |
+
COMMANDS
|
| 200 |
+
COMMAND is one of the following:
|
| 201 |
+
|
| 202 |
+
evaluate
|
| 203 |
+
Evaluate a model based on its outputs. This is the default entrypoint if no command is specified.
|
| 204 |
+
|
| 205 |
+
evaluate_from_model
|
| 206 |
+
Evaluate a model from HuggingFace or an API provider. This is a wrapper around `evaluate` which includes generating from a desired model.
|
| 207 |
+
|
| 208 |
+
make_leaderboard
|
| 209 |
+
Precompute and save an entire leaderboard for a given dataset / evaluator / set of models generations.
|
| 210 |
+
|
| 211 |
+
analyze_evaluators
|
| 212 |
+
Analyze an evaluator (agreement with human, speed, price,...).
|
| 213 |
+
```
|
| 214 |
+
|
| 215 |
+
</details>
|
| 216 |
+
|
| 217 |
+
For more information about each function use `alpaca_eval <command> -- --help`.
|
| 218 |
+
|
| 219 |
+
# Leaderboards and how to interpret them
|
| 220 |
+
|
| 221 |
+
## Models
|
| 222 |
+
|
| 223 |
+
Our leaderboards are computed on the [AlpacaEval dataset](https://huggingface.co/datasets/tatsu-lab/alpaca_eval).
|
| 224 |
+
We precomputed the leaderboard for important models using `alpaca_eval_gpt4` (best quality), `claude` (free for
|
| 225 |
+
academics, and high quality), and `chatgpt_fn` (cheap and available for everyone). Our full leaderboards can be found
|
| 226 |
+
at [on this page](https://tatsu-lab.github.io/alpaca_eval/), but
|
| 227 |
+
we give minimal leaderboards below.
|
| 228 |
+
Later we also show how to [add your model](https://github.com/tatsu-lab/alpaca_eval#evaluating-a-model) to the
|
| 229 |
+
leaderboard and how to make
|
| 230 |
+
a [new leaderboard for your evaluator/dataset](https://github.com/tatsu-lab/alpaca_eval#making-a-new-leaderboard).
|
| 231 |
+
See [here](https://github.com/tatsu-lab/alpaca_eval/tree/main/src/alpaca_eval/models_configs) for the configs of all
|
| 232 |
+
models that are available out of the box.
|
| 233 |
+
|
| 234 |
+
**`alpaca_eval_gpt4` minimal leaderboard**:
|
| 235 |
+
|
| 236 |
+
| | Win Rate | Std Error |
|
| 237 |
+
|:----------------------|---------:|----------:|
|
| 238 |
+
| gpt4 | 95.3 | 0.7 |
|
| 239 |
+
| claude | 88.4 | 1.1 |
|
| 240 |
+
| chatgpt | 86.1 | 1.2 |
|
| 241 |
+
| wizardlm-13b | 75.3 | 1.5 |
|
| 242 |
+
| guanaco-65b | 71.8 | 1.6 |
|
| 243 |
+
| vicuna-13b | 70.4 | 1.6 |
|
| 244 |
+
| oasst-rlhf-llama-33b | 66.5 | 1.7 |
|
| 245 |
+
| text_davinci_003 | 50.0 | 0.0 |
|
| 246 |
+
| falcon-40b-instruct | 45.7 | 1.8 |
|
| 247 |
+
| alpaca-farm-ppo-human | 41.2 | 1.7 |
|
| 248 |
+
| alpaca-7b | 26.5 | 1.5 |
|
| 249 |
+
| text_davinci_001 | 15.2 | 1.2 |
|
| 250 |
+
|
| 251 |
+
<details>
|
| 252 |
+
<summary><b>How exactly are those metrics computed?</b></summary>
|
| 253 |
+
|
| 254 |
+
**Win Rate**: the win rate measures the fraction of time the model's output is preferred over text-davinci-003 outputs (
|
| 255 |
+
i.e. the reference).
|
| 256 |
+
More specifically, to compute the win rate we collect pairs of outputs of the desired model on every instruction from
|
| 257 |
+
the
|
| 258 |
+
ApacaEval dataset.
|
| 259 |
+
We then pair each output with the output of our reference model (`text-davinci-003`) on the same instruction.
|
| 260 |
+
We then ask our automatic evaluator which output they prefer.
|
| 261 |
+
See [here](https://github.com/tatsu-lab/alpaca_eval/tree/main/src/alpaca_eval/evaluators_configs/alpaca_eval_gpt4)
|
| 262 |
+
and [here](https://github.com/tatsu-lab/alpaca_eval/tree/main/src/alpaca_eval/evaluators_configs/claude) for the exact
|
| 263 |
+
prompts and configs for GPT4 and Claude, in particular we randomize the order of
|
| 264 |
+
outputs to avoid position bias.
|
| 265 |
+
We then average the preferences over all instructions in the dataset to get the win rate of the model over
|
| 266 |
+
text-davinci-003.
|
| 267 |
+
If both outputs are exactly the same we use a half preference for both models.
|
| 268 |
+
|
| 269 |
+
**Standard error**: this is the standard error (normalized by N-1) of the win rate, i.e., the preferences averaged over
|
| 270 |
+
the different instructions.
|
| 271 |
+
|
| 272 |
+
[//]: # (The standard error measures the uncertainty over instructions and sampling from the evaluator.)
|
| 273 |
+
|
| 274 |
+
</details>
|
| 275 |
+
|
| 276 |
+
<details>
|
| 277 |
+
<summary><b>Details about <code>alpaca_eval_gpt4</code></b></summary>
|
| 278 |
+
|
| 279 |
+
Our `alpaca_eval_gpt4` (
|
| 280 |
+
see [configs](#https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/evaluators_configs/alpaca_eval_gpt4/configs.yaml#L5))
|
| 281 |
+
annotator averages over preferences, where preferences are obtained as follows:
|
| 282 |
+
|
| 283 |
+
1. it takes in an instruction and a pair of outputs (from the desired model and the reference model)
|
| 284 |
+
2. if a preference was this triple was already computed, it returns it (i.e. it uses caching)
|
| 285 |
+
3. it randomizes the order of the outputs to avoid position bias
|
| 286 |
+
4. it formats the instruction and outputs into
|
| 287 |
+
the [following zero-shot prompt](https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/evaluators_configs/alpaca_eval_gpt4/alpaca_eval.txt),
|
| 288 |
+
which asks to order the outputs in order of preference
|
| 289 |
+
5. it completes the prompt using GPT4 with `temperature=0`
|
| 290 |
+
6. it parses the preference from the completions and returns it
|
| 291 |
+
|
| 292 |
+
The annotator is a mix between (and was highly influenced by) [AlpacaFarm](https://github.com/tatsu-lab/alpaca_farm)
|
| 293 |
+
and [Aviary](https://github.com/ray-project/aviary/tree/master) evaluators.
|
| 294 |
+
In particular, we use the same code as for AlpacaFarm (caching/randomization/hyperparameters) but use a ranking prompt
|
| 295 |
+
similar to that of Aviary.
|
| 296 |
+
We make changes to Aviary's prompt to decrease the bias for longer outputs.
|
| 297 |
+
Details in [Related work](#related-work).
|
| 298 |
+
|
| 299 |
+
</details>
|
| 300 |
+
|
| 301 |
+
<details>
|
| 302 |
+
<summary><b><code>claude</code> minimal leaderboard</b></summary>
|
| 303 |
+
|
| 304 |
+
| | Win Rate | Std Error |
|
| 305 |
+
|:----------------------|---------:|----------:|
|
| 306 |
+
| gpt4 | 77.0 | 1.5 |
|
| 307 |
+
| claude | 75.8 | 1.5 |
|
| 308 |
+
| chatgpt | 67.7 | 1.6 |
|
| 309 |
+
| wizardlm-13b | 66.1 | 1.7 |
|
| 310 |
+
| vicuna-13b | 63.2 | 1.7 |
|
| 311 |
+
| guanaco-65b | 62.6 | 1.7 |
|
| 312 |
+
| oasst-rlhf-llama-33b | 57.3 | 1.7 |
|
| 313 |
+
| text_davinci_003 | 50.0 | 0.0 |
|
| 314 |
+
| falcon-40b-instruct | 46.7 | 1.8 |
|
| 315 |
+
| alpaca-farm-ppo-human | 46.5 | 1.8 |
|
| 316 |
+
| alpaca-7b | 32.3 | 1.6 |
|
| 317 |
+
| text_davinci_001 | 21.5 | 1.4 |
|
| 318 |
+
|
| 319 |
+
</details>
|
| 320 |
+
|
| 321 |
+
<details>
|
| 322 |
+
<summary><b><code>chatgpt_fn</code> minimal leaderboard</b></summary>
|
| 323 |
+
|
| 324 |
+
| | Win Rate | Std Err. |
|
| 325 |
+
|:----------------------|---------:|---------:|
|
| 326 |
+
| gpt4 | 73.8 | 1.5 |
|
| 327 |
+
| claude | 70.4 | 1.6 |
|
| 328 |
+
| chatgpt | 66.1 | 1.7 |
|
| 329 |
+
| wizardlm-13b | 65.2 | 1.7 |
|
| 330 |
+
| vicuna-13b | 64.1 | 1.7 |
|
| 331 |
+
| guanaco-65b | 62.4 | 1.7 |
|
| 332 |
+
| oasst-rlhf-llama-33b | 62.0 | 1.7 |
|
| 333 |
+
| alpaca-farm-ppo-human | 60.2 | 1.7 |
|
| 334 |
+
| falcon-40b-instruct | 56.5 | 1.7 |
|
| 335 |
+
| text_davinci_003 | 50.0 | 0.0 |
|
| 336 |
+
| alpaca-7b | 45.2 | 1.7 |
|
| 337 |
+
| text_davinci_001 | 28.1 | 1.6 |
|
| 338 |
+
|
| 339 |
+
</details>
|
| 340 |
+
|
| 341 |
+
## Evaluators
|
| 342 |
+
|
| 343 |
+
We evaluate different automatic annotators on the AlpacaEval set by comparing to
|
| 344 |
+
2.5K [human annotations](https://huggingface.co/datasets/tatsu-lab/alpaca_eval/blob/main/alpaca_farm_human_crossannotations.json)
|
| 345 |
+
we collected (~650 instructions each with 4 human annotations).
|
| 346 |
+
Below we show metrics for our suggested evaluator (`alpaca_eval_gpt4`), for prior
|
| 347 |
+
automatic
|
| 348 |
+
evaluators ([`alpaca_farm_greedy_gpt4`](https://github.com/tatsu-lab/alpaca_farm),[`aviary_gpt4`](https://aviary.anyscale.com/),[`lmsys_gpt4`](https://chat.lmsys.org/)),
|
| 349 |
+
for humans (`humans`), and for different base models with essentially the same
|
| 350 |
+
prompt (`gpt4`,`claude`,`text_davinci_003`,`chatgpt_fn`,`guanaco_33b`, `chatgpt`).
|
| 351 |
+
See [here](https://github.com/tatsu-lab/alpaca_eval/tree/main/src/alpaca_eval/evaluators_configs) for the configs of all
|
| 352 |
+
evaluators that are available out of the box and their associated metrics.
|
| 353 |
+
|
| 354 |
+
| | Human agreement [%] | Price [$/1000 examples] | Time [seconds/1000 examples] | Bias | Variance | Proba. prefer longer |
|
| 355 |
+
|:------------------------|--------------------:|------------------------:|-----------------------------:|-----:|---------:|---------------------:|
|
| 356 |
+
| alpaca_eval_gpt4 | 69.2 | 13.6 | 1455 | 28.4 | 14.6 | 0.68 |
|
| 357 |
+
| aviary_gpt4 | 69.1 | 12.8 | 1869 | 29.5 | 13.1 | 0.70 |
|
| 358 |
+
| gpt4 | 66.9 | 12.5 | 1037 | 31.5 | 14.6 | 0.65 |
|
| 359 |
+
| alpaca_farm_greedy_gpt4 | 66.4 | 15.3 | 878 | 30.2 | 19.3 | 0.60 |
|
| 360 |
+
| humans | 65.7 | 300.0 | 36800 | 0.0 | 34.3 | 0.64 |
|
| 361 |
+
| claude | 65.5 | 11.1 | 173 | 31.9 | 18.0 | 0.62 |
|
| 362 |
+
| text_davinci_003 | 64.1 | 8.7 | 121 | 33.8 | 22.7 | 0.70 |
|
| 363 |
+
| lmsys_gpt4 | 63.2 | 13.9 | 17982 | 34.7 | 16.1 | 0.74 |
|
| 364 |
+
| chatgpt_fn | 60.0 | 1.0 | 530 | 36.9 | 27.7 | 0.62 |
|
| 365 |
+
| chatgpt | 57.2 | 0.8 | 285 | 39.4 | 34.1 | 0.59 |
|
| 366 |
+
|
| 367 |
+
<details>
|
| 368 |
+
<summary><b>How exactly are those metrics computed?</b></summary>
|
| 369 |
+
|
| 370 |
+
We now explain in words how we compute the metrics in the table
|
| 371 |
+
above. [The code is here](https://github.com/tatsu-lab/alpaca_eval/blob/f05cbd651b79ac93906b19d01fe443b45828b0f2/src/alpaca_eval/analyze.py#L366).
|
| 372 |
+
|
| 373 |
+
**Human agreement [%]**: this measures the agreement between the current annotator and the majority preferences of
|
| 374 |
+
humans on
|
| 375 |
+
our
|
| 376 |
+
~650 annotations from
|
| 377 |
+
our [cross-annotation set](https://huggingface.co/datasets/tatsu-lab/alpaca_eval/blob/main/alpaca_farm_human_crossannotations.json),
|
| 378 |
+
which contains 4 human annotations per example.
|
| 379 |
+
To estimate the agreement between a single human (`humans` row in the table above) and the majority of humans, we take
|
| 380 |
+
one of the 4 annotations and compute the accuracy that it has when predicting the mode of the other 3 annotations.
|
| 381 |
+
We then average this accuracy over all 4 annotations and over the 650 instructions to get the human agreement, i.e., we
|
| 382 |
+
compute the expected (over humans and samples)
|
| 383 |
+
leave-one-out agreement.
|
| 384 |
+
If the mode is not unique, we take one of the modes at random.
|
| 385 |
+
We perform exactly the same computation for the automatic annotators, so that the final numbers are comparable.
|
| 386 |
+
|
| 387 |
+
[//]: # ($$agreement = E[E_i[I[z_i == mode({z^*_j}_{j \neq i})]]]$$)
|
| 388 |
+
|
| 389 |
+
**Price [$/1000 examples]**: this is the average price of every 1000 annotations.
|
| 390 |
+
For humans, it is the price that [we paid Mechanical Turkers](https://arxiv.org/abs/2305.14387) to collect those
|
| 391 |
+
annotations ($18/hour).
|
| 392 |
+
If the price depends on the machine used to compute the annotations (e.g. Guanaco) we leave it empty.
|
| 393 |
+
|
| 394 |
+
**Time [seconds/1000 examples]**: this is the average time it takes to compute 1000 annotations.
|
| 395 |
+
For humans, it is the estimated median time that each Mechanical Turker took to annotate 1000 examples.
|
| 396 |
+
For automatic annotators, it is the average time that it took us when running the annotations. Note that this can depend
|
| 397 |
+
on API limits that are different for different users and the number of requests that the clusters are
|
| 398 |
+
processing.
|
| 399 |
+
|
| 400 |
+
**Bias**: agreement between the most likely human label and the most likely automatic one.
|
| 401 |
+
For automatic annotators we estimate it by sampling 4 different annotations for each example.
|
| 402 |
+
The randomness here comes from the order of the outputs in the prompt, sampling from the LLM, and if applicable the
|
| 403 |
+
order of the instruction in the batch and the choice of annotator in the pool.
|
| 404 |
+
We then take the mode of the 4 annotations and compute the accuracy of the mode when predicting the mode of the 4 human
|
| 405 |
+
annotations.
|
| 406 |
+
Note that this is likely an overestimate on the real bias that we would get if we had an "infinite" number of
|
| 407 |
+
cross-annotations.
|
| 408 |
+
A low bias means that the annotator has in expectation the same preferences as humans.
|
| 409 |
+
For the case of humans, the bias is zero by definition.
|
| 410 |
+
Note that this is related to but not the standard statistical bias, because we take the mode instead of average over
|
| 411 |
+
annotations and we consider 0-1 loss instead of squared loss.
|
| 412 |
+
|
| 413 |
+
[//]: # ($$agreement = 1 - E[E_i[I[mode({z_j}_{j \neq i} == mode({z^*_j}_{j \neq i})]]]$$)
|
| 414 |
+
|
| 415 |
+
**Variance**: expected agreement a single automatic preference and the most likely one.
|
| 416 |
+
We estimate it the same way as we estimated "human agreement" for humans, i.e., we take the expected leave one out error
|
| 417 |
+
when predicting the mode of the 3 annotations using the 4th annotation.
|
| 418 |
+
A low variance means that the annotator is consistent with its preference, i.e., if you sample from it with different
|
| 419 |
+
seeds it will give the same result.
|
| 420 |
+
As with the bias, this is not exactly the standard statistical variance, because we take the mode instead of average
|
| 421 |
+
over annotations and we
|
| 422 |
+
consider 0-1 loss instead of squared loss.
|
| 423 |
+
|
| 424 |
+
Note that the "human agreement" is tightly related to the bias and variance. In particular, the variance
|
| 425 |
+
measures the error due to the fact that we only use a single annotation while the bias aims to measure the irreducible
|
| 426 |
+
error
|
| 427 |
+
for the current annotator.
|
| 428 |
+
|
| 429 |
+
[//]: # (More specifically we have that `agreement ≈ (1 - bias)*(1 - variance) + bias*variance`.)
|
| 430 |
+
|
| 431 |
+
[//]: # (Where the first term measures the agreement due to having no errors from bias and variance, while the second term)
|
| 432 |
+
|
| 433 |
+
[//]: # (measures the accuracy due to having errors caused from both the bias and variance.)
|
| 434 |
+
|
| 435 |
+
[//]: # ($$agreement = 1 - E[E_i[I[z_i == mode({z_j}_{j \neq i})]]]$$)
|
| 436 |
+
|
| 437 |
+
**Proba. prefer longer**: this is the probability that the annotator prefers the longer output when one of the two
|
| 438 |
+
outputs is significantly longer than the other (more than 30 characters difference).
|
| 439 |
+
|
| 440 |
+
In the [full table](https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/evaluators_configs/README.md) we
|
| 441 |
+
also provide the following metrics:
|
| 442 |
+
|
| 443 |
+
**Proba. prefer lists**: this is the probability that the annotator prefers the output that contains a list/bullet
|
| 444 |
+
points when one output does but not the other.
|
| 445 |
+
|
| 446 |
+
**Proba. prefer 1**: this is the probability that the annotator prefers the first of the pair of outputs. All our
|
| 447 |
+
proposed annotators randomize over outputs in the prompt, so this should be 0.5. Prior annotators, such as `lmsys`
|
| 448 |
+
and `aviary`, do not.
|
| 449 |
+
|
| 450 |
+
**# parsed**: this is the number of examples that the annotator was able to parse.
|
| 451 |
+
|
| 452 |
+
Note that if the variance and bias is empty, it means that we only performed one single annotation for each 648 example
|
| 453 |
+
due to resource (time and price) constraints. This explains why the #parsed is 648, otherwise it should be 2592.
|
| 454 |
+
|
| 455 |
+
</details>
|
| 456 |
+
|
| 457 |
+
<details>
|
| 458 |
+
<summary><b>Tips for choosing evaluators</b></summary>
|
| 459 |
+
|
| 460 |
+
Overall we recommend using `annotators_config=alpaca_eval_gpt4` if you want the highest agreement with humans,
|
| 461 |
+
`annotators_config=claude` if you have academic (free) access to Claude and have a low budget, and
|
| 462 |
+
`annotators_config=chatgpt_fn` if you don't have access to the other two models.
|
| 463 |
+
|
| 464 |
+
When choosing an annotator we recommend you to consider the following (the first three are obvious):
|
| 465 |
+
|
| 466 |
+
- `"Human agreement [%]"`
|
| 467 |
+
- `"Price [$/1000 examples]"`
|
| 468 |
+
- `"Time [seconds/1000 examples]"`
|
| 469 |
+
- `"Proba. prefer longer"` approx. < 0.7. Indeed, we found see that the majority of preference of human annotators have
|
| 470 |
+
strong bias for longer answers (as shown by the
|
| 471 |
+
high [performance=62.2](https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/evaluators_configs/README.md)
|
| 472 |
+
of
|
| 473 |
+
the `"longest"` evaluator that always
|
| 474 |
+
prefers the longest output). This suggests that it might more of a bias with the human annotators. In order to avoid
|
| 475 |
+
having leaderboards with strong biases for length, we suggest using automatic annotators with less than 0.7 "Proba.
|
| 476 |
+
prefer longer".
|
| 477 |
+
- `"Variance"` approx. < 0.2. We believe that a good evaluator should have as little variance as possible so that
|
| 478 |
+
results are mostly reproducible. Note that variance can be desirable in the case where we are simulating humans
|
| 479 |
+
as shown in [AlpacaFarm](https://arxiv.org/abs/2305.14387).
|
| 480 |
+
|
| 481 |
+
We filtered the annotators that do not satisfy those requirements in the table above (besides humans / ChatGPT / 003 /
|
| 482 |
+
lmsys for
|
| 483 |
+
reference purposes). For
|
| 484 |
+
all
|
| 485 |
+
results see [here](https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/evaluators_configs/README.md).
|
| 486 |
+
In general, we found `alpaca_eval_gpt4` to be a good trade-off between quality / price / time /
|
| 487 |
+
variance / length bias.
|
| 488 |
+
|
| 489 |
+
</details>
|
| 490 |
+
|
| 491 |
+
The above metrics are computed with respect to annotations from crowd-workers. Although useful, those annotations are
|
| 492 |
+
not perfect, e.g., crowd-workers often favor style
|
| 493 |
+
over
|
| 494 |
+
factuality. We thus recommend users to validate automatic evaluators on their own instructions and human annotations.
|
| 495 |
+
Details in [limitations](#limitations).
|
| 496 |
+
|
| 497 |
+
# Use-cases
|
| 498 |
+
|
| 499 |
+
[//]: # ()
|
| 500 |
+
|
| 501 |
+
[//]: # (<details>)
|
| 502 |
+
|
| 503 |
+
[//]: # ()
|
| 504 |
+
|
| 505 |
+
[//]: # ( <summary><b>Installation from source (optional)</b></b></summary>)
|
| 506 |
+
|
| 507 |
+
[//]: # ()
|
| 508 |
+
|
| 509 |
+
[//]: # (If you make changes to the configurations files or code, it might be easier to install `alpaca_eval` from source.)
|
| 510 |
+
|
| 511 |
+
[//]: # (If so follow the following steps:)
|
| 512 |
+
|
| 513 |
+
[//]: # ()
|
| 514 |
+
|
| 515 |
+
[//]: # (1. clone the repository)
|
| 516 |
+
|
| 517 |
+
[//]: # ()
|
| 518 |
+
|
| 519 |
+
[//]: # (2. install as dev the package: `pip install -e .`)
|
| 520 |
+
|
| 521 |
+
[//]: # ()
|
| 522 |
+
|
| 523 |
+
[//]: # (3. (optional) export)
|
| 524 |
+
|
| 525 |
+
[//]: # ()
|
| 526 |
+
|
| 527 |
+
[//]: # ( all [API_KEYs](https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/constants.py#L7))
|
| 528 |
+
|
| 529 |
+
[//]: # ()
|
| 530 |
+
|
| 531 |
+
[//]: # (4. test your installation (assuming you have OpenAI)
|
| 532 |
+
|
| 533 |
+
[//]: # ()
|
| 534 |
+
|
| 535 |
+
[//]: # ( key) `alpaca_eval --model_outputs 'example/outputs.json' --annotators_config 'text_davinci_003' ~~--max_instances 3~~ --caching_path None`)
|
| 536 |
+
|
| 537 |
+
[//]: # ()
|
| 538 |
+
|
| 539 |
+
[//]: # (</details>)
|
| 540 |
+
|
| 541 |
+
## Evaluating a model
|
| 542 |
+
|
| 543 |
+
<details>
|
| 544 |
+
<summary><code>>>> alpaca_eval evaluate -- --help</code></summary>
|
| 545 |
+
|
| 546 |
+
```
|
| 547 |
+
NAME
|
| 548 |
+
alpaca_eval evaluate - Evaluate a model based on its outputs. This is the default entrypoint if no command is specified.
|
| 549 |
+
|
| 550 |
+
SYNOPSIS
|
| 551 |
+
alpaca_eval evaluate <flags>
|
| 552 |
+
|
| 553 |
+
DESCRIPTION
|
| 554 |
+
Evaluate a model based on its outputs. This is the default entrypoint if no command is specified.
|
| 555 |
+
|
| 556 |
+
FLAGS
|
| 557 |
+
--model_outputs=MODEL_OUTPUTS
|
| 558 |
+
Type: Optional[Union]
|
| 559 |
+
Default: None
|
| 560 |
+
The outputs of the model to add to the leaderboard. Accepts data (list of dictionary, pd.dataframe, datasets.Dataset) or a path to read those (json, csv, tsv) or a function to generate those. Each dictionary (or row of dataframe) should contain the keys that are formatted in the prompts. E.g. by default `instruction` and `output` with optional `input`. If None, we just print the leaderboard.
|
| 561 |
+
-r, --reference_outputs=REFERENCE_OUTPUTS
|
| 562 |
+
Type: Union
|
| 563 |
+
Defaul...
|
| 564 |
+
The outputs of the reference model. Same format as `model_outputs`. If None, the reference outputs are the
|
| 565 |
+
003 outputs on the AlpacaEval set.
|
| 566 |
+
--annotators_config=ANNOTATORS_CONFIG
|
| 567 |
+
Type: Union
|
| 568 |
+
Default: 'alpaca_eval_gpt4'
|
| 569 |
+
The path the (or list of dict of) the annotator's config file. For details see the docstring of `PairwiseA
|
| 570 |
+
nnotator`.
|
| 571 |
+
-n, --name=NAME
|
| 572 |
+
Type: Optional[Optional]
|
| 573 |
+
Default: None
|
| 574 |
+
The name of the model to add to the leaderboard. If None we check if `generator is in model_outputs` if no
|
| 575 |
+
t we use "Current model".
|
| 576 |
+
-o, --output_path=OUTPUT_PATH
|
| 577 |
+
Type: Union
|
| 578 |
+
Default: 'auto'
|
| 579 |
+
Path to the directory where the new leaderboard and the annotations should be stored. If None we don't sav
|
| 580 |
+
e. If `auto` we use `model_outputs` if it is a path, and otherwise use the directory from which we call the script
|
| 581 |
+
.
|
| 582 |
+
-p, --precomputed_leaderboard=PRECOMPUTED_LEADERBOARD
|
| 583 |
+
Type: Union
|
| 584 |
+
Default: 'auto'
|
| 585 |
+
The precomputed leaderboard or a path to it (json, csv, or tsv). The leaderboard should contain at least t
|
| 586 |
+
he column `win_rate`. If `auto` we will try to use the corresponding leaderboard for the reference outputs (only i
|
| 587 |
+
f in CORRESPONDING_OUTPUTS_LEADERBOARDS). If `None` we won't add other models from the leaderboard.
|
| 588 |
+
--is_overwrite_leaderboard=IS_OVERWRITE_LEADERBOARD
|
| 589 |
+
Type: bool
|
| 590 |
+
Default: False
|
| 591 |
+
Whether to overwrite the leaderboard if the model is already in it.
|
| 592 |
+
-l, --leaderboard_mode_to_print=LEADERBOARD_MODE_TO_PRINT
|
| 593 |
+
Type: Optional
|
| 594 |
+
Default: 'minimal'
|
| 595 |
+
The mode of the leaderboard to use. Only used if the precomputed leaderboard has a column `mode`, in which
|
| 596 |
+
case it will filter the leaderboard by this mode. If None keeps all.
|
| 597 |
+
-c, --current_leaderboard_mode=CURRENT_LEADERBOARD_MODE
|
| 598 |
+
Type: str
|
| 599 |
+
Default: 'community'
|
| 600 |
+
The mode of the leaderboard for the current method.
|
| 601 |
+
--is_return_instead_of_print=IS_RETURN_INSTEAD_OF_PRINT
|
| 602 |
+
Type: bool
|
| 603 |
+
Default: False
|
| 604 |
+
Whether to return the metrics instead of printing the results.
|
| 605 |
+
-f, --fn_metric=FN_METRIC
|
| 606 |
+
Type: Union
|
| 607 |
+
Default: 'pairwise_to_winrate'
|
| 608 |
+
The function or function name in `metrics.py` that will be used to convert preference to metrics. The func
|
| 609 |
+
tion should take a sequence of preferences (0 for draw, 1 for base win, 2 when the model to compare wins) and retu
|
| 610 |
+
rn a dictionary of metrics and the key by which to sort the leaderboard.
|
| 611 |
+
-s, --sort_by=SORT_BY
|
| 612 |
+
Type: str
|
| 613 |
+
Default: 'win_rate'
|
| 614 |
+
The key by which to sort the leaderboard.
|
| 615 |
+
--is_cache_leaderboard=IS_CACHE_LEADERBOARD
|
| 616 |
+
Type: Optional
|
| 617 |
+
Default: None
|
| 618 |
+
Whether to save the result leaderboard to `precomputed_leaderboard`. If None we save only if max_instances
|
| 619 |
+
. A preferred way of adding models to the leaderboard is to set `precomputed_leaderboard` to the previously saved
|
| 620 |
+
leaderboard at `<output_path>/leaderboard.csv`.
|
| 621 |
+
--max_instances=MAX_INSTANCES
|
| 622 |
+
Type: Optional[Optional]
|
| 623 |
+
Default: None
|
| 624 |
+
The maximum number of instances to annotate. Useful for testing.
|
| 625 |
+
--annotation_kwargs=ANNOTATION_KWARGS
|
| 626 |
+
Type: Optional[Optional]
|
| 627 |
+
Default: None
|
| 628 |
+
Additional arguments to pass to `PairwiseAnnotator.annotate_head2head`.
|
| 629 |
+
Additional flags are accepted.
|
| 630 |
+
Additional arguments to pass to `PairwiseAnnotator`.
|
| 631 |
+
```
|
| 632 |
+
|
| 633 |
+
</details>
|
| 634 |
+
|
| 635 |
+
<details>
|
| 636 |
+
<summary><code>>>> alpaca_eval evaluate_from_model -- --help</code></summary>
|
| 637 |
+
|
| 638 |
+
```
|
| 639 |
+
NAME
|
| 640 |
+
alpaca_eval evaluate_from_model - Evaluate a model from HuggingFace or an API provider. This is a wrapper around `evaluate` which includes generating from a desired model.
|
| 641 |
+
|
| 642 |
+
SYNOPSIS
|
| 643 |
+
alpaca_eval evaluate_from_model MODEL_CONFIGS <flags>
|
| 644 |
+
|
| 645 |
+
DESCRIPTION
|
| 646 |
+
Evaluate a model from HuggingFace or an API provider. This is a wrapper around `evaluate` which includes generating from a desired model.
|
| 647 |
+
|
| 648 |
+
POSITIONAL ARGUMENTS
|
| 649 |
+
MODEL_CONFIGS
|
| 650 |
+
Type: Union
|
| 651 |
+
A dictionary or path (relative to `models_configs`) to a yaml file containing the configuration of the model to decode from. If a directory,we search for 'configs.yaml' in it. The keys in the first dictionary should be the generator's name, and the value should be a dictionary of the generator's configuration which should have the
|
| 652 |
+
|
| 653 |
+
FLAGS
|
| 654 |
+
-r, --reference_model_configs=REFERENCE_MODEL_CONFIGS
|
| 655 |
+
Type: Optional[Union]
|
| 656 |
+
Default: None
|
| 657 |
+
Same as in `model_configs` but for the reference model. If None, we use the same model as the one we are
|
| 658 |
+
-e, --evaluation_dataset=EVALUATION_DATASET
|
| 659 |
+
Type: Union
|
| 660 |
+
Defaul...
|
| 661 |
+
Path to the evaluation dataset or a function that returns a dataframe. If None, we use the default evaluat
|
| 662 |
+
ion
|
| 663 |
+
-a, --annotators_config=ANNOTATORS_CONFIG
|
| 664 |
+
Type: Union
|
| 665 |
+
Default: 'alpaca_eval_gpt4'
|
| 666 |
+
Path to the annotators configuration or a dictionary. If None, we use the default annotators configuration
|
| 667 |
+
.
|
| 668 |
+
-o, --output_path=OUTPUT_PATH
|
| 669 |
+
Type: Union
|
| 670 |
+
Default: 'auto'
|
| 671 |
+
Path to save the generations, annotations and leaderboard. If auto saves at `results/<model_name>`
|
| 672 |
+
-m, --max_instances=MAX_INSTANCES
|
| 673 |
+
Type: Optional[int]
|
| 674 |
+
Default: None
|
| 675 |
+
Maximum number of instances to generate and evaluate. If None, we evaluate all instances.
|
| 676 |
+
-i, --is_strip_output=IS_STRIP_OUTPUT
|
| 677 |
+
Type: bool
|
| 678 |
+
Default: True
|
| 679 |
+
Whether to strip trailing and leading whitespaces from the outputs.
|
| 680 |
+
Additional flags are accepted.
|
| 681 |
+
Other kwargs to `evaluate`
|
| 682 |
+
|
| 683 |
+
NOTES
|
| 684 |
+
You can also use flags syntax for POSITIONAL ARGUMENTS
|
| 685 |
+
```
|
| 686 |
+
|
| 687 |
+
</details>
|
| 688 |
+
|
| 689 |
+
To evaluate a model you need to:
|
| 690 |
+
|
| 691 |
+
1. Choose an evaluation set and compute outputs specified as `model_outputs`. By default, we use
|
| 692 |
+
the 805 examples from [AlpacaEval](#data-release). To compute outputs on AlpacaEval use:
|
| 693 |
+
|
| 694 |
+
```python
|
| 695 |
+
import datasets
|
| 696 |
+
|
| 697 |
+
eval_set = datasets.load_dataset("tatsu-lab/alpaca_eval", "alpaca_eval")["eval"]
|
| 698 |
+
for example in eval_set:
|
| 699 |
+
# generate here is a placeholder for your models generations
|
| 700 |
+
example["output"] = generate(example["instruction"])
|
| 701 |
+
```
|
| 702 |
+
|
| 703 |
+
if your model is a HuggingFace model or from a standard API provider (OpenAI, Anthropic, Cohere). Then you can
|
| 704 |
+
directly use `alpaca_eval evaluate_from_model` to also take care of generating outputs.
|
| 705 |
+
|
| 706 |
+
2. Compute the reference outputs `reference_outputs`. By default, we use the outputs of `text-davinci-003` on
|
| 707 |
+
AlpacaEval.
|
| 708 |
+
If you
|
| 709 |
+
want to use a different model or a different dataset follow the same steps as (1.).
|
| 710 |
+
3. Choose an evaluator specified via `annotators_config`. We recommend using `alpaca_eval_gpt4` or `claude` (if you are
|
| 711 |
+
an
|
| 712 |
+
academic) or `chatgpt_fn` (if you don't have access to the other two). For options and comparisons
|
| 713 |
+
see [this table](#evaluators). Depending on the evaluator you might need to
|
| 714 |
+
set the appropriate API_KEY in your environment
|
| 715 |
+
or [here](https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/constants.py#L7).
|
| 716 |
+
|
| 717 |
+
Running all together:
|
| 718 |
+
|
| 719 |
+
```bash
|
| 720 |
+
alpaca_eval --model_outputs 'example/outputs.json' \
|
| 721 |
+
--annotators_config 'alpaca_eval_gpt4' \
|
| 722 |
+
--reference_outputs <path to outputs if not text_davinci_003 on AlpacaEval>
|
| 723 |
+
```
|
| 724 |
+
|
| 725 |
+
If you don't have decoded outputs, you can use `evaluate_from_model` which takes care of decoding (model and reference)
|
| 726 |
+
for you.
|
| 727 |
+
Here's an
|
| 728 |
+
example:
|
| 729 |
+
|
| 730 |
+
```bash
|
| 731 |
+
# need a GPU for local models
|
| 732 |
+
export ANTHROPIC_API_KEY=<your_api_key> # let's annotate with claude
|
| 733 |
+
alpaca_eval evaluate_from_model \
|
| 734 |
+
--model_configs 'oasst_pythia_12b' \
|
| 735 |
+
--annotators_config 'claude' \
|
| 736 |
+
--reference_model_configs <path to configs not text_davinci_003 on AlpacaEval>
|
| 737 |
+
```
|
| 738 |
+
|
| 739 |
+
Here the `model_configs` and `reference_model_configs` (optional) are paths to a directory that specifies the prompt,
|
| 740 |
+
the model
|
| 741 |
+
provider (here HuggingFace) and decoding parameters.
|
| 742 |
+
See [this directory](https://github.com/tatsu-lab/alpaca_eval/tree/main/src/alpaca_eval/models_configs) for examples.
|
| 743 |
+
For all model providers that are available out-of-the-box
|
| 744 |
+
see [here](https://github.com/tatsu-lab/alpaca_eval/tree/main/src/alpaca_eval/decoders).
|
| 745 |
+
|
| 746 |
+
<details>
|
| 747 |
+
<summary><b>Information about annotators</b></b></summary>
|
| 748 |
+
|
| 749 |
+
- **Caching**: by default all annotations are cached on
|
| 750 |
+
disk at `caching_path`. Annotations are thus never recomputed, which makes annotations faster, cheaper and allow for
|
| 751 |
+
reproducibility. This helps even when evaluating different models as many models
|
| 752 |
+
have
|
| 753 |
+
the same outputs.
|
| 754 |
+
- **Output randomization** by default, we randomize over the examples of outputs, as we found that annotators tend to
|
| 755 |
+
prefer the first examples
|
| 756 |
+
they see.
|
| 757 |
+
- **Batching** we provide code and examples to batch annotations, which decreases cost and time for annotations if the
|
| 758 |
+
prompt is long. See for
|
| 759 |
+
example [alpaca_farm_greedy_gpt4](https://github.com/tatsu-lab/alpaca_eval/tree/main/src/alpaca_eval/evaluators_configs/alpaca_farm_greedy_gpt4).
|
| 760 |
+
- **Pool of annotators** we provide code and examples to evaluate using a pool of automatic annotators, which is helpful
|
| 761 |
+
for replicating the variance of [human annotations](https://arxiv.org/abs/2305.14387). See for
|
| 762 |
+
example [alpaca_farm](https://github.com/tatsu-lab/alpaca_eval/tree/main/src/alpaca_eval/evaluators_configs/alpaca_farm).
|
| 763 |
+
- **Seeding based on instructions** For reproducibility and more fair comparison between models, we seed all
|
| 764 |
+
randomness (output order, order in batches,
|
| 765 |
+
examples for each annotator in a pool) based on the instruction.
|
| 766 |
+
|
| 767 |
+
</details>
|
| 768 |
+
|
| 769 |
+
## Making a new leaderboard
|
| 770 |
+
|
| 771 |
+
<details>
|
| 772 |
+
<summary><code>>>> alpaca_eval make_leaderboard -- --help</code></summary>
|
| 773 |
+
|
| 774 |
+
```
|
| 775 |
+
NAME
|
| 776 |
+
alpaca_eval make_leaderboard - Precompute and save an entire leaderboard for a given dataset / evaluator / set of models generations.
|
| 777 |
+
|
| 778 |
+
SYNOPSIS
|
| 779 |
+
alpaca_eval make_leaderboard LEADERBOARD_PATH <flags>
|
| 780 |
+
|
| 781 |
+
DESCRIPTION
|
| 782 |
+
Precompute and save an entire leaderboard for a given dataset / evaluator / set of models generations.
|
| 783 |
+
|
| 784 |
+
POSITIONAL ARGUMENTS
|
| 785 |
+
LEADERBOARD_PATH
|
| 786 |
+
Type: Union
|
| 787 |
+
The path to save the leaderboard to. The leaderboard will be saved as a csv file, if it already exists it will
|
| 788 |
+
|
| 789 |
+
FLAGS
|
| 790 |
+
--annotators_config=ANNOTATORS_CONFIG
|
| 791 |
+
Type: Union
|
| 792 |
+
Default: 'alpaca_eval_gpt4'
|
| 793 |
+
The path the (or list of dict of) the annotator's config file.
|
| 794 |
+
--all_model_outputs=ALL_MODEL_OUTPUTS
|
| 795 |
+
Type: Union
|
| 796 |
+
Default: <fu...
|
| 797 |
+
The outputs of all models to add to the leaderboard. Accepts data (list of dictionary, pd.dataframe, datas
|
| 798 |
+
ets.Dataset) or a path to read those (json, csv, tsv potentially with globbing) or a function to generate those. I
|
| 799 |
+
f the path contains a globbing pattern, we will read all files matching the pattern and concatenate them. Each dic
|
| 800 |
+
tionary (or row of dataframe) should contain the keys that are formatted in the prompts. E.g. by default `instruct
|
| 801 |
+
ion` and `output` with optional `input`. It should also contain a column `generator` with the name of the current
|
| 802 |
+
model.
|
| 803 |
+
-r, --reference_outputs=REFERENCE_OUTPUTS
|
| 804 |
+
Type: Union
|
| 805 |
+
Defaul...
|
| 806 |
+
The outputs of the reference model. Same format as `all_model_outputs` but without needing `generator`. By
|
| 807 |
+
default, the reference outputs are the 003 outputs on AlpacaEval set.
|
| 808 |
+
-f, --fn_add_to_leaderboard=FN_ADD_TO_LEADERBOARD
|
| 809 |
+
Type: Callable
|
| 810 |
+
Default: 'evaluate'
|
| 811 |
+
The function to use to add a model to the leaderboard. If a string, it should be the name of a function in
|
| 812 |
+
`main.py`. The function should take the arguments: `model_outputs`, `annotators_config`, `name`, `precomputed_lea
|
| 813 |
+
derboard`, `is_return_instead_of_print`, `reference_outputs`.
|
| 814 |
+
-i, --is_return_instead_of_print=IS_RETURN_INSTEAD_OF_PRINT
|
| 815 |
+
Type: bool
|
| 816 |
+
Default: False
|
| 817 |
+
Whether to return the metrics instead of printing the results.
|
| 818 |
+
Additional flags are accepted.
|
| 819 |
+
Additional arguments to pass to `fn_add_to_leaderboard`.
|
| 820 |
+
|
| 821 |
+
NOTES
|
| 822 |
+
You can also use flags syntax for POSITIONAL ARGUMENTS
|
| 823 |
+
```
|
| 824 |
+
|
| 825 |
+
</details>
|
| 826 |
+
|
| 827 |
+
If you want to make a new leaderboard using a single command (rather than multiple `alpaca_eval` calls), for your
|
| 828 |
+
desired evaluation
|
| 829 |
+
set and evaluators, you can use the following:
|
| 830 |
+
|
| 831 |
+
```bash
|
| 832 |
+
alpaca_eval make_leaderboard \
|
| 833 |
+
--leaderboard_path <path_to_save_leaderboard> \
|
| 834 |
+
--all_model_outputs <model_outputs_path> \
|
| 835 |
+
--reference_outputs <reference_outputs_path> \
|
| 836 |
+
--annotators_config <path_to_config.yaml>
|
| 837 |
+
```
|
| 838 |
+
|
| 839 |
+
where:
|
| 840 |
+
|
| 841 |
+
- `leaderboard_path`: path to save the leaderboard to. The leaderboard will be saved as a csv file, if it already exists
|
| 842 |
+
it will append.
|
| 843 |
+
- `all_model_outputs` : The json path to the outputs of all models to add to the leaderboard (as a single file or by
|
| 844 |
+
globbing multiple files). Each dictionary should contain
|
| 845 |
+
the keys (`instruction` and `output`) that are formatted in the prompts and a column `generator` with the name of the
|
| 846 |
+
current model. As an example
|
| 847 |
+
see [this file](https://huggingface.co/datasets/tatsu-lab/alpaca_eval/blob/main/alpaca_eval_all_outputs.json).
|
| 848 |
+
- `reference_outputs` the path to the outputs of the reference model. Each dictionary should contain
|
| 849 |
+
the keys (`instruction` and `output`) that are formatted in the prompts. By
|
| 850 |
+
default, the reference outputs are the 003 outputs on AlpacaEval set.
|
| 851 |
+
- `annotators_config`: The path to the annotator's config file. Defaults to `alpaca_eval_gpt4`.
|
| 852 |
+
|
| 853 |
+
## Making a new evaluator
|
| 854 |
+
|
| 855 |
+
<details>
|
| 856 |
+
<summary><code>>>> alpaca_eval analyze_evaluators -- --help</code></summary>
|
| 857 |
+
|
| 858 |
+
```
|
| 859 |
+
NAME
|
| 860 |
+
alpaca_eval analyze_evaluators - Analyze an evaluator and populates the evaluators leaderboard (agreement with human, speed, price,...).
|
| 861 |
+
|
| 862 |
+
SYNOPSIS
|
| 863 |
+
alpaca_eval analyze_evaluators <flags>
|
| 864 |
+
|
| 865 |
+
DESCRIPTION
|
| 866 |
+
Analyze an evaluator (agreement with human, speed, price,...).
|
| 867 |
+
|
| 868 |
+
FLAGS
|
| 869 |
+
--annotators_config=ANNOTATORS_CONFIG
|
| 870 |
+
Type: Union
|
| 871 |
+
Default: 'alpaca_eval_gpt4'
|
| 872 |
+
The path the (or list of dict of) the annotator's config file.
|
| 873 |
+
-A, --Annotator=ANNOTATOR
|
| 874 |
+
Default: <class 'alpaca_eval.annotators.pairwise_evaluator.PairwiseAn...
|
| 875 |
+
The annotator class to use.
|
| 876 |
+
--analyzer_kwargs=ANALYZER_KWARGS
|
| 877 |
+
Type: Optional[]
|
| 878 |
+
Default: None
|
| 879 |
+
Additional arguments to pass to the analyzer.
|
| 880 |
+
-p, --precomputed_leaderboard=PRECOMPUTED_LEADERBOARD
|
| 881 |
+
Type: Union
|
| 882 |
+
Default: PosixPath('/Users/yanndubois/Desktop/GitHub/alpaca_eval/src/...
|
| 883 |
+
The precomputed (meta)leaderboard of annotators or a path to it (json, csv, or tsv).
|
| 884 |
+
--is_save_leaderboard=IS_SAVE_LEADERBOARD
|
| 885 |
+
Type: bool
|
| 886 |
+
Default: False
|
| 887 |
+
Whether to save the leaderboard (ie analyzed results).
|
| 888 |
+
--is_return_instead_of_print=IS_RETURN_INSTEAD_OF_PRINT
|
| 889 |
+
Type: bool
|
| 890 |
+
Default: False
|
| 891 |
+
Whether to return the leaderboard (ie analyzed results). If True, it will not print the results.
|
| 892 |
+
--is_overwrite_leaderboard=IS_OVERWRITE_LEADERBOARD
|
| 893 |
+
Type: bool
|
| 894 |
+
Default: False
|
| 895 |
+
Whether to overwrite the leaderboard if it already exists.
|
| 896 |
+
-m, --max_instances=MAX_INSTANCES
|
| 897 |
+
Type: Optional[Optional]
|
| 898 |
+
Default: None
|
| 899 |
+
The maximum number of instances to analyze.
|
| 900 |
+
--is_single_annotator=IS_SINGLE_ANNOTATOR
|
| 901 |
+
Type: bool
|
| 902 |
+
Default: False
|
| 903 |
+
Whether to analyze a single annotator. If True, will not be able to estimate the annotator's bias.
|
| 904 |
+
```
|
| 905 |
+
|
| 906 |
+
</details>
|
| 907 |
+
|
| 908 |
+
AlpacaEval provides a simple way of making new evaluators. All you need is to make a new `configs.yaml` configuration
|
| 909 |
+
file, which you will then pass
|
| 910 |
+
as `--annotators_config <path_to_config.yaml>` to `alpaca_eval`.
|
| 911 |
+
Here are some ways you can make a new evaluator:
|
| 912 |
+
|
| 913 |
+
- **Changing the prompt**: Write a new prompt in a text file and specify the path in `prompt_template` of the
|
| 914 |
+
configuration file. Paths are relative to the configuration file.
|
| 915 |
+
- **Changing decoding parameters**: Specify the desired parameters in `completions_kwargs` in the configuration file. To
|
| 916 |
+
see all available parameters refer to the docstrings of the corresponding
|
| 917 |
+
function [in this file](https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/decoders/__init__.py)
|
| 918 |
+
specified by `fn_completions`
|
| 919 |
+
in the configuration file.
|
| 920 |
+
- **Changing the model**: Specify the desired model in `model_name` and the corresponding
|
| 921 |
+
prompt in `prompt_template`. If the model comes from another provider you
|
| 922 |
+
will
|
| 923 |
+
have
|
| 924 |
+
to change `fn_completions` which maps to the corresponding function
|
| 925 |
+
in [this file](https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/decoders/__init__.py). We
|
| 926 |
+
provide `fn_completions` functions to use models from OpenAI, Anthropic, Cohere, or HuggingFace. To
|
| 927 |
+
install packages needed for
|
| 928 |
+
all providers
|
| 929 |
+
use `pip install alpaca_eval[all]`.
|
| 930 |
+
|
| 931 |
+
[//]: # (- **Using multiple annotators**: Specify a list of annotators in `annotators_config` in the configuration file. For an)
|
| 932 |
+
|
| 933 |
+
[//]: # ( example)
|
| 934 |
+
|
| 935 |
+
[//]: # ( see [alpaca_farm configuration](https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/evaluators_configs/alpaca_farm/configs.yaml).)
|
| 936 |
+
|
| 937 |
+
<details>
|
| 938 |
+
<summary><b>Other parameters in the configuration file</b></b></summary>
|
| 939 |
+
|
| 940 |
+
The easiest is to check the docstrings
|
| 941 |
+
of [`SinglePairwiseAnnotator`](https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/annotators/pairwise_evaluator.py#L537).
|
| 942 |
+
Here are some important ones:
|
| 943 |
+
|
| 944 |
+
```
|
| 945 |
+
Parameters
|
| 946 |
+
----------
|
| 947 |
+
prompt_template : path
|
| 948 |
+
A prompt that will be given to `fn_prompter` or path to the prompts. Path is relative to
|
| 949 |
+
`evaluators_configs/`
|
| 950 |
+
|
| 951 |
+
fn_completion_parser : callable or str
|
| 952 |
+
Function in `completion_parsers.py` to use for parsing the completions into preferences. For each completion,
|
| 953 |
+
the number of preferences should be equal to the batch_size if not we set all the preferences in that batch to
|
| 954 |
+
NaN.
|
| 955 |
+
|
| 956 |
+
completion_parser_kwargs : dict
|
| 957 |
+
Kwargs for fn_completion_parser.
|
| 958 |
+
|
| 959 |
+
fn_completions : callable or str
|
| 960 |
+
Function in `decoders.py` to use for decoding the output.
|
| 961 |
+
|
| 962 |
+
completions_kwargs : dict
|
| 963 |
+
kwargs for fn_completions. E.g. model_name, max_tokens, temperature, top_p, top_k, stop_seq.
|
| 964 |
+
|
| 965 |
+
is_randomize_output_order : bool
|
| 966 |
+
Whether to randomize output_1, output_2 when formatting.
|
| 967 |
+
|
| 968 |
+
batch_size : int
|
| 969 |
+
Number of examples that will be added in a single prompt.
|
| 970 |
+
```
|
| 971 |
+
|
| 972 |
+
</details>
|
| 973 |
+
|
| 974 |
+
Once you made the evaluator you can also analyze it and add it to the _evaluator's_ [leaderboard](#evaluators) using the
|
| 975 |
+
following command:
|
| 976 |
+
|
| 977 |
+
```bash
|
| 978 |
+
alpaca_eval analyze_evaluators --annotators_config '<path_to_config.yaml>'
|
| 979 |
+
```
|
| 980 |
+
|
| 981 |
+
To estimate the bias and variance this evaluates every example with 4 seeds, i.e., 2.5K
|
| 982 |
+
evaluation.
|
| 983 |
+
If you want a cheaper evaluation you can use a single seed using `--is_single_annotator True` which will skip the
|
| 984 |
+
estimation of bias and variance.
|
| 985 |
+
|
| 986 |
+
# Additional analysis and plots
|
| 987 |
+
|
| 988 |
+
AlpacaEval provides a few visualization tools to help you analyze and improve your automatic evaluation pipeline. We
|
| 989 |
+
briefly explain
|
| 990 |
+
them here and provide
|
| 991 |
+
notebooks for more analysis.
|
| 992 |
+
For a description of all the metrics we consider
|
| 993 |
+
refer to [How exactly are those metrics computed?](https://github.com/tatsu-lab/alpaca_eval#evaluators)
|
| 994 |
+
|
| 995 |
+
## Analyzing an evaluator
|
| 996 |
+
|
| 997 |
+
**Analyzing evaluators:**
|
| 998 |
+
[](https://colab.research.google.com/github/tatsu-lab/alpaca_eval/blob/main/notebooks/analyzing_annotators.ipynb)
|
| 999 |
+
|
| 1000 |
+
As we saw in [the evaluator's leaderboard](#evaluators), there are many metrics to consider when selecting an evaluator,
|
| 1001 |
+
e.g. the quality, price, and speed. To assist with selection of the evaluator we provide a few functions to plot those
|
| 1002 |
+
metrics.
|
| 1003 |
+
The following shows for example the price/time/agreement of the different evaluators.
|
| 1004 |
+
|
| 1005 |
+

|
| 1006 |
+
|
| 1007 |
+
Here we see that `alpaca_eval_gpt4` performs very well and is better than humans on all the considered metrics.
|
| 1008 |
+
|
| 1009 |
+
Previously we only considered the agreement with human annotators overall.
|
| 1010 |
+
An additional validation that one could do is checking whether making a leaderboard using our
|
| 1011 |
+
automatic annotator gives similar results as a leaderboard from humans.
|
| 1012 |
+
To enable such analysis, we release [human
|
| 1013 |
+
annotations](#data-release) of outputs from 22 methods from [AlpacaFarm](https://github.com/tatsu-lab/alpaca_farm) =>
|
| 1014 |
+
22*805 = ~18K annotations. As a result we
|
| 1015 |
+
can
|
| 1016 |
+
test
|
| 1017 |
+
the correlation between the win-rates of the 22 models as evaluated by the humans and our automatic annotator.
|
| 1018 |
+
Note that this is arguably a better way of selecting an automatic evaluator than using "human agreement [%]" but is
|
| 1019 |
+
expensive given that it requires 18K
|
| 1020 |
+
annotations.
|
| 1021 |
+
The plot below shows such correlation for the `alpaca_eval_gpt4` evaluator.
|
| 1022 |
+
|
| 1023 |
+
<p float="left" align="middle">
|
| 1024 |
+
<img src="figures/plot_winrate_correlations_alpaca_eval.png" alt="Correlation between humans and alpaca_eval_gpt4" width="400"/>
|
| 1025 |
+
</p>
|
| 1026 |
+
|
| 1027 |
+
We see that the `alpaca_eval_gpt4` leaderboard is highly correlated (0.94 Pearson correlation) to the leaderboard from
|
| 1028 |
+
humans, which further
|
| 1029 |
+
suggests that automatic evaluation is a good proxy for human evaluation.
|
| 1030 |
+
For the code and more analysis,
|
| 1031 |
+
see [this notebook](https://github.com/tatsu-lab/alpaca_eval/blob/main/notebooks/analyzing_annotators.ipynb), or the
|
| 1032 |
+
colab notebook above.
|
| 1033 |
+
|
| 1034 |
+
## Analyzing an eval set
|
| 1035 |
+
|
| 1036 |
+
**Making evaluation sets:**
|
| 1037 |
+
[](https://colab.research.google.com/github/tatsu-lab/alpaca_eval/blob/main/notebooks/analyzing_evalset.ipynb)
|
| 1038 |
+
|
| 1039 |
+
When creating an evaluation set there are two main factors to consider: how much data to use? and what data?
|
| 1040 |
+
|
| 1041 |
+
One way of answering those question is by considering a leaderboard of models that you believe are of different
|
| 1042 |
+
quality and checking what and how much data is needed to distinguish between them in a statistically significant way.
|
| 1043 |
+
We will do so below using a paired t-test to test if the difference in win-rates between every pair of models
|
| 1044 |
+
is
|
| 1045 |
+
statistically significant.
|
| 1046 |
+
|
| 1047 |
+
First, let us consider the question of how much data to use.
|
| 1048 |
+
Below we show the number of random samples needed from AlpacaEval for the paired t-test to give a p-value < 0.05 for
|
| 1049 |
+
each pair of models in the minimal `alpaca_eval_gpt4`
|
| 1050 |
+
leaderboard.
|
| 1051 |
+
Grey cells correspond to pairs that are not significantly different on the 805 samples.
|
| 1052 |
+
y- and x-axis are ordered by the win-rate of the first and second model respectively.
|
| 1053 |
+
|
| 1054 |
+
[//]: # ()
|
| 1055 |
+
|
| 1056 |
+
<p float="left" align="middle">
|
| 1057 |
+
<img src="figures/plot_paired_ttest_nsamples.png" alt="Number of samples needed to distinguish pairs in the Claude leaderboard" width="500"/>
|
| 1058 |
+
</p>
|
| 1059 |
+
|
| 1060 |
+
We see that most models can already be distinguished with 50 samples, and that 150 samples allows distinguishing the
|
| 1061 |
+
majority of pairs (74 out of 78). This suggests that we can decrease the evaluation set size by a factor of
|
| 1062 |
+
4 when testing two models that have similar performance gaps as those on the
|
| 1063 |
+
minimal `alpaca_eval_gpt4` [leaderboard](#models).
|
| 1064 |
+
|
| 1065 |
+
The second question is what data to use. Again we can try to answer this question from a statistical power perspective:
|
| 1066 |
+
what data allows to best distinguish between models. Let's consider this for all the datasets that are part of
|
| 1067 |
+
AlpacaEval, but let us control for the size of the evaluation sets as we only care about the quality of the data. The
|
| 1068 |
+
following plot shows the p-values from the paired t-test of each pairs of models on 80 examples of each subset of
|
| 1069 |
+
AlpacaEval.
|
| 1070 |
+
|
| 1071 |
+

|
| 1072 |
+
|
| 1073 |
+
We see for example that the self-instruct dataset yields the least statistical power, which suggests that one could
|
| 1074 |
+
remove this dataset from the evaluation set.
|
| 1075 |
+
The exact reason should be analyzed in future work.
|
| 1076 |
+
For the code and more analysis
|
| 1077 |
+
see [this notebook](https://github.com/tatsu-lab/alpaca_eval/blob/main/notebooks/analyzing_evalset.ipynb), or the
|
| 1078 |
+
colab notebook above.
|
| 1079 |
+
|
| 1080 |
+
# Contributing
|
| 1081 |
+
|
| 1082 |
+
We are accepting PRs for new models, evaluators, and eval sets, in addition to bug fixes.
|
| 1083 |
+
We will update the [leaderboard website](https://tatsu-lab.github.io/alpaca_eval/) regularly with new community
|
| 1084 |
+
contributions.
|
| 1085 |
+
We have also created a [support discord](https://discord.gg/GJMxJSVZZM) for AlpacaEval in case you run into any issues
|
| 1086 |
+
and
|
| 1087 |
+
wish to ask help from the community.
|
| 1088 |
+
|
| 1089 |
+
To get started, please first fork the repo, and install the package from source `pip install -e .`
|
| 1090 |
+
|
| 1091 |
+
<details>
|
| 1092 |
+
<summary><h2 tabindex="-1" dir="auto">Contributing a model</h2></summary>
|
| 1093 |
+
|
| 1094 |
+
First, you'll need to add a model config definition in the [models_configs](src/alpaca_eval/models_configs/) folder. As
|
| 1095 |
+
an example, you can look at
|
| 1096 |
+
the [falcon-7b-instruct yaml](src/alpaca_eval/models_configs/falcon-7b-instruct/configs.yaml). Please make sure the
|
| 1097 |
+
folder name and key name in the yaml match exactly.
|
| 1098 |
+
|
| 1099 |
+
Then, please follow the steps in [Evaluating a model](#evaluating-a-model) to run inference on the model to produce
|
| 1100 |
+
outputs on the eval set and score the model according to one of the evaluators.
|
| 1101 |
+
An example command may look like:
|
| 1102 |
+
|
| 1103 |
+
```sh
|
| 1104 |
+
alpaca_eval evaluate_from_model \
|
| 1105 |
+
--model_configs 'falcon-7b-instruct' \
|
| 1106 |
+
--annotators_config 'alpaca_eval_gpt4'
|
| 1107 |
+
```
|
| 1108 |
+
|
| 1109 |
+
After running this command, you should have generated an outputs json and a new entry in the corresponding [leaderboard
|
| 1110 |
+
file](https://github.com/tatsu-lab/alpaca_eval/tree/main/src/alpaca_eval/leaderboards/data_AlpacaEval). Please make a PR
|
| 1111 |
+
with the
|
| 1112 |
+
config, outputs file, and updated leaderboard.
|
| 1113 |
+
|
| 1114 |
+
Concretely you should do something like:
|
| 1115 |
+
|
| 1116 |
+
1. Fork the repository in github
|
| 1117 |
+
2. Clone the forked repository `git clone <URL>`
|
| 1118 |
+
3. Make a model config at `src/alpaca_eval/models_configs/<model_name>` and evaluate it `evaluate_from_model --model_configs '<model_name>'`
|
| 1119 |
+
4. Add the model configs, output, and leaderboard entry to the forked repository
|
| 1120 |
+
```sh
|
| 1121 |
+
git add src/alpaca_eval/models_configs/<model_name>
|
| 1122 |
+
git add src/alpaca_eval/leaderboards/data_AlpacaEval
|
| 1123 |
+
git add results/<model_name>/model_outputs.json
|
| 1124 |
+
git commit -m "Add <model_name> to AlpacaEval"
|
| 1125 |
+
git push
|
| 1126 |
+
```
|
| 1127 |
+
5. Create a [pull request on AlpacaEval](https://github.com/tatsu-lab/alpaca_eval/pulls)
|
| 1128 |
+
|
| 1129 |
+
</details>
|
| 1130 |
+
|
| 1131 |
+
<details>
|
| 1132 |
+
<summary><h2 tabindex="-1" dir="auto">Contributing an evaluator</h2></summary>
|
| 1133 |
+
|
| 1134 |
+
Please first follow the directions in [Making a new evaluator](#making-a-new-evaluator).
|
| 1135 |
+
Once you're created the annotator config, we ask that you create a new leaderboard for the annotator by evaluating the
|
| 1136 |
+
minimal set of models. The outputs for these models can be found by
|
| 1137 |
+
downloading [alpaca_eval_all_outputs.json](https://huggingface.co/datasets/tatsu-lab/alpaca_eval/blob/main/alpaca_eval_all_outputs.json).
|
| 1138 |
+
|
| 1139 |
+
```bash
|
| 1140 |
+
alpaca_eval make_leaderboard \
|
| 1141 |
+
--leaderboard_path src/alpaca_eval/leaderboards/data_AlpacaEval/<evaluator>_leaderboard.csv \
|
| 1142 |
+
--all_model_outputs alpaca_eval_all_outputs.json \
|
| 1143 |
+
--annotators_config <evaluator_config>
|
| 1144 |
+
```
|
| 1145 |
+
|
| 1146 |
+
Then, please create a PR with the annotator config and leaderboard csv.
|
| 1147 |
+
|
| 1148 |
+
</details>
|
| 1149 |
+
|
| 1150 |
+
<details>
|
| 1151 |
+
<summary><h2 tabindex="-1" dir="auto">Contributing an eval set</h2></summary>
|
| 1152 |
+
|
| 1153 |
+
To contribute a new eval set, you'll first need to specify a set of textual instructions.
|
| 1154 |
+
Then, you'll need to specify a set of reference outputs (model win-rates are computed against this reference).
|
| 1155 |
+
For ease of use, you may use the default [text-davinci-003](src/alpaca_eval/models_configs/text_davinci_003/) reference
|
| 1156 |
+
config.
|
| 1157 |
+
|
| 1158 |
+
Place these together into a json, where each entry specifies the fields `instruction`, `output`, and `generator`. You
|
| 1159 |
+
can look to [alpaca_eval.json](https://huggingface.co/datasets/tatsu-lab/alpaca_eval/blob/main/alpaca_eval.json) as a
|
| 1160 |
+
guide (the `dataset` field is not necessary).
|
| 1161 |
+
|
| 1162 |
+
Finally, we ask that you create a minimal leaderboard on this new evaluation set. You can do this with the following:
|
| 1163 |
+
|
| 1164 |
+
```bash
|
| 1165 |
+
alpaca_eval make_leaderboard \
|
| 1166 |
+
--leaderboard_path <src/alpaca_eval/leaderboards/data_AlpacaEval/your_leaderboard_name.csv> \
|
| 1167 |
+
--all_model_outputs alpaca_eval_all_outputs.json \
|
| 1168 |
+
--reference_outputs <path_to_json_file>
|
| 1169 |
+
```
|
| 1170 |
+
|
| 1171 |
+
Please submit a PR with the eval set json and corresponding leaderboard csv.
|
| 1172 |
+
|
| 1173 |
+
</details>
|
| 1174 |
+
|
| 1175 |
+
# Limitations
|
| 1176 |
+
|
| 1177 |
+
The AlpacaEval evaluation pipeline, like other current evaluators have important limitations and should therefore not be
|
| 1178 |
+
used as replacement for human evaluation in important settings, such as to decide whether a model is ready to be
|
| 1179 |
+
deployed.
|
| 1180 |
+
Those can broadly be clustered into 3 categories:
|
| 1181 |
+
|
| 1182 |
+
1. **Instructions might not be representative of real-usage**: the AlpacaEval set contains examples from a variety of
|
| 1183 |
+
datasets ([self-instruct](https://github.com/yizhongw/self-instruct),
|
| 1184 |
+
[open-assistant](https://huggingface.co/datasets/OpenAssistant/oasst1/viewer/OpenAssistant--oasst1/validation), [vicuna](https://lmsys.org/blog/2023-03-30-vicuna/), [koala](https://github.com/arnav-gudibande/koala-test-set), [hh-rlhf](https://huggingface.co/datasets/Anthropic/hh-rlhf/viewer/Anthropic--hh-rlhf/test))
|
| 1185 |
+
which might not be representative of real-usage and advanced applications of better models like GPT4. As a
|
| 1186 |
+
result, the gap between the top and the rest of the AlpacaEval leaderboard is likely smaller than it would be on more
|
| 1187 |
+
complex instructions. See for
|
| 1188 |
+
example [this blog](https://medium.com/@marcotcr/exploring-chatgpt-vs-open-source-models-on-slightly-harder-tasks-aa0395c31610)
|
| 1189 |
+
for preliminary results on more complex instructions.
|
| 1190 |
+
Note, however, that in [AlpacaFarm](https://arxiv.org/abs/2305.14387) we showed that win-rates on our evaluation set
|
| 1191 |
+
are highly correlated (0.97 R2) with win-rates on instructions from user interactions with the Alpaca Demo.
|
| 1192 |
+
Furthermore, the AlpacaEval leaderboard shows larger
|
| 1193 |
+
gap between the open models and OpenAI models than other leaderboards (
|
| 1194 |
+
e.g. [lmsys](https://lmsys.org/blog/2023-03-30-vicuna/)).
|
| 1195 |
+
|
| 1196 |
+
2. **Biases of automatic annotators**: the automatic annotators seem to have implicit biases. In particular, we found
|
| 1197 |
+
that they tend to prefer longer outputs and outputs that contain lists (e.g. 0.68 / 0.69 for `alpaca_eval_gpt4`
|
| 1198 |
+
and 0.62 / 0.58 for `claude`).
|
| 1199 |
+
Although we found that humans have similar biases (0.64 / 0.61), we believe that this could be more of a limitation
|
| 1200 |
+
of human annotation pipeline we used rather than a true human bias. More generally, through qualitative analysis, we
|
| 1201 |
+
found that automatic annotators give more importance to the style
|
| 1202 |
+
of the output than its content (e.g. factuality).
|
| 1203 |
+
Finally, we found that automatic evaluators tend to prefer outputs from models that are similar (likely trained on
|
| 1204 |
+
the same data) as suggested by the big difference between ChatGPT/GPT4 on `claude`'s and `alpaca_eval_gpt4`'s
|
| 1205 |
+
leaderboard.
|
| 1206 |
+
3. **Lack of safety evaluation**: importantly, AlpacaEval only evaluates the instruction-following capabilities of
|
| 1207 |
+
models rather than the harm that they could cause (e.g. toxic behavior or bias). As a result the small gap between
|
| 1208 |
+
current ChatGPT and the best open source models **should not** be interpreted as if that the latter are ready to be
|
| 1209 |
+
deployed.
|
| 1210 |
+
|
| 1211 |
+
Beyond those limitations about the evaluation pipelines, there are also limitations about our validation of the
|
| 1212 |
+
evaluators and our [proposed approach](#analyzing-an-eval-set) to selecting evaluation sets.
|
| 1213 |
+
|
| 1214 |
+
<details>
|
| 1215 |
+
<summary><b>Limitations about our validation pipeline</b></b></summary>
|
| 1216 |
+
|
| 1217 |
+
First, our validation of evaluators based on human cross-annotations suffers from the following limitations: (1) we
|
| 1218 |
+
qualitatively found that our crowd-workers tend to also favor style such as length and presence of lists over
|
| 1219 |
+
factuality;
|
| 1220 |
+
(2) this does not validate whether win-rates against a reference model is a good evaluation strategy in the first place;
|
| 1221 |
+
(3) preferences from 16 crowd-workers are not representative of preferences of all humans.
|
| 1222 |
+
|
| 1223 |
+
Second, our suggested approach to selecting evaluation sets based on statistical power suffers from the following
|
| 1224 |
+
limitations: (1) statistical power does not ensure the right direction, e.g. you can have an unnatural set of
|
| 1225 |
+
instructions where Alpaca "performs" better than better model; and
|
| 1226 |
+
(2) this can push users to select data to support the hypothesis that they want to validate.
|
| 1227 |
+
|
| 1228 |
+
</details>
|
| 1229 |
+
|
| 1230 |
+
# Citation
|
| 1231 |
+
|
| 1232 |
+
Please consider citing the repo if you used the automatic annotators, code, or results.
|
| 1233 |
+
|
| 1234 |
+
```
|
| 1235 |
+
@misc{alpaca_eval,
|
| 1236 |
+
author = {Xuechen Li and Tianyi Zhang and Yann Dubois and Rohan Taori and Ishaan Gulrajani and Carlos Guestrin and Percy Liang and Tatsunori B. Hashimoto },
|
| 1237 |
+
title = {AlpacaEval: An Automatic Evaluator of Instruction-following Models},
|
| 1238 |
+
year = {2023},
|
| 1239 |
+
publisher = {GitHub},
|
| 1240 |
+
journal = {GitHub repository},
|
| 1241 |
+
howpublished = {\url{https://github.com/tatsu-lab/alpaca_eval}}
|
| 1242 |
+
}
|
| 1243 |
+
```
|
| 1244 |
+
|
| 1245 |
+
If you used our human annotation data, please also consider citing the [AlpacaFarm](https://arxiv.org/abs/2305.14387)
|
| 1246 |
+
paper:
|
| 1247 |
+
|
| 1248 |
+
```
|
| 1249 |
+
@misc{dubois2023alpacafarm,
|
| 1250 |
+
title={AlpacaFarm: A Simulation Framework for Methods that Learn from Human Feedback},
|
| 1251 |
+
author={Yann Dubois and Xuechen Li and Rohan Taori and Tianyi Zhang and Ishaan Gulrajani and Jimmy Ba and Carlos Guestrin and Percy Liang and Tatsunori B. Hashimoto},
|
| 1252 |
+
year={2023},
|
| 1253 |
+
eprint={2305.14387},
|
| 1254 |
+
archivePrefix={arXiv},
|
| 1255 |
+
primaryClass={cs.LG}
|
| 1256 |
+
}
|
| 1257 |
+
```
|
| 1258 |
+
|
| 1259 |
+
If you use the AlpacaEval evaluation set, please cite each of the constituent
|
| 1260 |
+
datasets: [self-instruct](https://github.com/yizhongw/self-instruct),
|
| 1261 |
+
[open-assistant](https://huggingface.co/datasets/OpenAssistant/oasst1/viewer/OpenAssistant--oasst1/validation), [vicuna](https://lmsys.org/blog/2023-03-30-vicuna/), [koala](https://github.com/arnav-gudibande/koala-test-set), [hh-rlhf](https://huggingface.co/datasets/Anthropic/hh-rlhf/viewer/Anthropic--hh-rlhf/test).
|
| 1262 |
+
|
| 1263 |
+
# More information
|
| 1264 |
+
|
| 1265 |
+
<details>
|
| 1266 |
+
<summary><h2 tabindex="-1" dir="auto">Data Release</h2></summary>
|
| 1267 |
+
|
| 1268 |
+
As part of AlpacaEval, we release the following data:
|
| 1269 |
+
|
| 1270 |
+
- **Human annotations (17701)** in order to develop and understand automatic evaluators, we release all the human
|
| 1271 |
+
pairwise
|
| 1272 |
+
evaluation that we collected for AlpacaFarm. This contains comparisons between 22 models with the `text-davinci-003`
|
| 1273 |
+
reference on the AlpacaFarm evaluation set. Annotations are from a pool of 16 crowd workers on Amazon Mechanical Turk.
|
| 1274 |
+
The different models are: 6 from OpenAI, 2 SFT models from AlpacaFarm, 13 RLHF methods from AlpacaFarm, and LLaMA 7B.
|
| 1275 |
+
- **Human cross-annotations (2596)** in order to further analyze automatic evaluators we selected (via stratified
|
| 1276 |
+
sampling
|
| 1277 |
+
across models and datasets) 650 examples from the AlpacaFarm evaluation set and collected 4 human annotations per
|
| 1278 |
+
example.
|
| 1279 |
+
- **AlpacaEval set (805)** we made slight modifications/simplification of the AlpacaFarm evaluation set. In particular,
|
| 1280 |
+
we first merged
|
| 1281 |
+
the instruction and input fields into a single instruction field. This affects 1/4 of the examples in the AlpacaFarm
|
| 1282 |
+
evaluation set, all of which are from the [self-instruct evaluation set](https://arxiv.org/abs/2212.10560). Second we
|
| 1283 |
+
regenerated the text-davinci-003 reference outputs without limiting the length of its outputs.
|
| 1284 |
+
|
| 1285 |
+
For more details about the human annotations refer to the [AlpacaFarm paper](https://arxiv.org/abs/2305.14387).
|
| 1286 |
+
|
| 1287 |
+
</details>
|
| 1288 |
+
|
| 1289 |
+
<details>
|
| 1290 |
+
<summary><h2 tabindex="-1" dir="auto">Differences with AlpacaFarm</h2></summary>
|
| 1291 |
+
|
| 1292 |
+
AlpacaEval is an improvement and simplification of the automatic pairwise preference simulator
|
| 1293 |
+
from [AlpacaFarm](https://github.com/tatsu-lab/alpaca_farm).
|
| 1294 |
+
Outside AlpacaFarm, you should be using AlpacaEval.
|
| 1295 |
+
Here are the main differences:
|
| 1296 |
+
|
| 1297 |
+
- **AlpacaEval merges instructions and inputs**: The AlpacaEval evaluation is the same as the AlpacaFarm evaluation
|
| 1298 |
+
except that the instruction and input fields are merged as `{instruction}\n\n{input}`. This affects 1/4 of the
|
| 1299 |
+
examples in the AlpacaFarm evaluation set (the [self-instruct](https://arxiv.org/abs/2212.10560) subset).
|
| 1300 |
+
This simplification provides a more fair comparison for models that were not trained by distinguishing between
|
| 1301 |
+
the two fields.
|
| 1302 |
+
- **AlpacaEval handles longer generations**: Models in AlpacaFarm were limited to a maximum number of 300 tokens for
|
| 1303 |
+
generations. We
|
| 1304 |
+
change this number to 2000 for AlpacaEval. Note that this also affects the reference generations (`text-davinci-003`),
|
| 1305 |
+
so the results on AlpacaEval are not comparable to those on AlpacaFarm even for examples that had no input
|
| 1306 |
+
field.
|
| 1307 |
+
- **AlpacaEval removes intra- and inter-annotator variance**: The AlpacaFarm simulator replicates human annotation in
|
| 1308 |
+
terms of both mode behavior and diversity.
|
| 1309 |
+
In particular, AlpacaFarm's simulator uses a pool of models and prompts and adds noise to replicate human intra- and
|
| 1310 |
+
inter-annotator variance.
|
| 1311 |
+
If the goal is to use an automatic annotator for evaluation or simply training better models, then this variance
|
| 1312 |
+
may not be desirable. The default annotators in AlpacaEval thus don't have this variance. We give the option to add it
|
| 1313 |
+
back by
|
| 1314 |
+
using `--anotators_config 'alpaca_farm'` and `--p_label_flip 0.25` when creating an evaluator.
|
| 1315 |
+
|
| 1316 |
+
[//]: # (- **Different goals** The goal of AlpacaEval is to provide a package for fast, reproducible,cheap, and)
|
| 1317 |
+
|
| 1318 |
+
[//]: # ( high-quality automatic evaluation of instruction-following models. As a secondary goal, we also provide simple toolkit for developing new evaluators. The goal of AlpacaFarm was to provide a simulator for studying the human-based RLHF pipeline.)
|
| 1319 |
+
|
| 1320 |
+
</details>
|
| 1321 |
+
|
| 1322 |
+
<details>
|
| 1323 |
+
<summary><h2 tabindex="-1" dir="auto">Related work</h2></summary>
|
| 1324 |
+
|
| 1325 |
+
There have been several work that propose new automatic annotators for instruction-following models. Here we list the
|
| 1326 |
+
ones that we are aware of and discuss how they differ from ours. We evaluated all of those
|
| 1327 |
+
in [our evaluator's leaderboard](https://github.com/tatsu-lab/alpaca_eval#evaluators).
|
| 1328 |
+
|
| 1329 |
+
- **Vicuna/lmsys** The lmsys annotator (`lmsys_gpt4`) evaluates the pair by asking the annotator a score from 1-10 for
|
| 1330 |
+
each output, and then selecting the output with the highest score as preferred. They do not randomize over output
|
| 1331 |
+
order and they ask an explanation _after_ the score. Overall, we found that this annotator has strong bias towards
|
| 1332 |
+
longer outputs (0.74) and relatively low correlation with human annotations (63.2).
|
| 1333 |
+
- **AlpacaFarm** The best AlpacaFarm annotator (`alpaca_farm_greedy_gpt4`) evaluates the pair by directly asking the
|
| 1334 |
+
annotator
|
| 1335 |
+
which output it prefers. Furthermore, it batches 5 examples together to amortize the length of the prompt and
|
| 1336 |
+
randomizes the order of outputs. Overall, we
|
| 1337 |
+
found that this annotator has much less bias towards longer outputs (0.60) and is faster (878 seconds/1000 examples)
|
| 1338 |
+
than others. It has a
|
| 1339 |
+
slightly higher correlation with the majority of human annotations (66.4) than humans themselves (65.7).
|
| 1340 |
+
However, it is more expensive ($15.3/1000 examples) and doesn't work with very long outputs given the batching.
|
| 1341 |
+
- **Aviary** The Aviary annotator (`aviary_gpt4`) asks the annotator to order the output by its preference, rather than
|
| 1342 |
+
simply selecting the preferred output. It does not randomize the order of outputs and uses high temperature for
|
| 1343 |
+
decoding (0.9). Overall, we found that this annotator has relatively strong bias towards longer outputs (0.70) and
|
| 1344 |
+
very high
|
| 1345 |
+
correlation with human annotations (69.1). By decreasing the temperature and randomizing the order of outputs,
|
| 1346 |
+
we [further improved](https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/evaluators_configs/README.md)
|
| 1347 |
+
the correlation to 69.8 (`improved_aviary_gpt4`) but this further increased the length bias to 0.73.
|
| 1348 |
+
|
| 1349 |
+
Our `alpaca_eval_gpt4` is a mix between the AlpacaFarm and Aviary annotators. It asks the annotator to order the outputs
|
| 1350 |
+
by preference, but it uses temperature 0, randomizes over outputs, and made some modifications to the prompt to decrease
|
| 1351 |
+
length bias to 0.68.
|
| 1352 |
+
|
| 1353 |
+
Other related work include recent papers which analyze automatic evaluators.
|
| 1354 |
+
For example:
|
| 1355 |
+
|
| 1356 |
+
- [AlpacaFarm Appx C](https://arxiv.org/abs/2305.14387)
|
| 1357 |
+
and [Large Language Models are not Fair Evaluators](https://arxiv.org/abs/2305.17926v1) both found that automatic
|
| 1358 |
+
annotators have
|
| 1359 |
+
a position bias.
|
| 1360 |
+
- [AlpacaFarm Sec. 5.2.](https://arxiv.org/abs/2305.14387)
|
| 1361 |
+
and [The False Promise of Imitating Proprietary LLMs](https://arxiv.org/abs/2305.15717) both found that
|
| 1362 |
+
automatic
|
| 1363 |
+
annotators favor style (e.g. use of list, tone, word choice, length) over factuality.
|
| 1364 |
+
|
| 1365 |
+
</details>
|
| 1366 |
+
|
| 1367 |
+
|
| 1368 |
+
<details>
|
| 1369 |
+
<summary><h2 tabindex="-1" dir="auto">Major updates</h2></summary>
|
| 1370 |
+
|
| 1371 |
+
- 19th June 2023: add leaderboard `chatgpt_fn` that anyone can use (no waiting lists).
|
| 1372 |
+
- 19th June 2023: update to
|
| 1373 |
+
use [OpenAI's function calling](https://openai.com/blog/function-calling-and-other-api-updates).
|
| 1374 |
+
Example: [`chatgpt_fn`](https://github.com/tatsu-lab/alpaca_eval/tree/main/src/alpaca_eval/evaluators_configs/chatgpt_fn)
|
| 1375 |
+
or [`alpaca_eval_gpt4_fn`](https://github.com/tatsu-lab/alpaca_eval/tree/main/src/alpaca_eval/evaluators_configs/alpaca_eval_gpt4_fn).
|
| 1376 |
+
|
| 1377 |
+
</details>
|
venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/RECORD
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
../../../bin/alpaca_eval,sha256=BpXXPXpg_bi6kqCZzS-5UoP9l8AFATmwTBqQGx11NBA,285
|
| 2 |
+
alpaca_eval-0.2.6.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 3 |
+
alpaca_eval-0.2.6.dist-info/LICENSE,sha256=bhdenb4mu0Leg2e_IhUwGnGz9AMkOi7vxWN4swdji-g,11409
|
| 4 |
+
alpaca_eval-0.2.6.dist-info/METADATA,sha256=Vm5D-aX5wU_GWV7YuD5aAzifAL1HAbN9UD9tJ97dsp4,69528
|
| 5 |
+
alpaca_eval-0.2.6.dist-info/RECORD,,
|
| 6 |
+
alpaca_eval-0.2.6.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 7 |
+
alpaca_eval-0.2.6.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
| 8 |
+
alpaca_eval-0.2.6.dist-info/entry_points.txt,sha256=80Fbhb475MjCZie0wJzpm3dJZXQ5_jXdIeumUSvXkHg,54
|
| 9 |
+
alpaca_eval-0.2.6.dist-info/top_level.txt,sha256=k6m1kZMZ1fuDbyOuJKNqDIdgvnqsg-PcVO7-ejJXOAU,12
|
| 10 |
+
alpaca_eval/__init__.py,sha256=29BtDatK9rha7K_7aWDyv15XTCWWtPpD2STcRpBLUwc,98
|
| 11 |
+
alpaca_eval/__pycache__/__init__.cpython-310.pyc,,
|
| 12 |
+
alpaca_eval/__pycache__/analyze.cpython-310.pyc,,
|
| 13 |
+
alpaca_eval/__pycache__/completion_parsers.cpython-310.pyc,,
|
| 14 |
+
alpaca_eval/__pycache__/constants.cpython-310.pyc,,
|
| 15 |
+
alpaca_eval/__pycache__/main.cpython-310.pyc,,
|
| 16 |
+
alpaca_eval/__pycache__/metrics.cpython-310.pyc,,
|
| 17 |
+
alpaca_eval/__pycache__/plotting.cpython-310.pyc,,
|
| 18 |
+
alpaca_eval/__pycache__/processors.cpython-310.pyc,,
|
| 19 |
+
alpaca_eval/__pycache__/types.cpython-310.pyc,,
|
| 20 |
+
alpaca_eval/__pycache__/utils.cpython-310.pyc,,
|
| 21 |
+
alpaca_eval/analyze.py,sha256=gt-B3nKsSgTUvb_LyM_wgqA8jAEr1U6FpwSnbn8VXFc,21377
|
| 22 |
+
alpaca_eval/annotators/__init__.py,sha256=1Hwqc8H9AdbPscwqM7NsPkNNSYdajZhv69ZbaXr6blY,54
|
| 23 |
+
alpaca_eval/annotators/__pycache__/__init__.cpython-310.pyc,,
|
| 24 |
+
alpaca_eval/annotators/__pycache__/base.cpython-310.pyc,,
|
| 25 |
+
alpaca_eval/annotators/__pycache__/pairwise_evaluator.cpython-310.pyc,,
|
| 26 |
+
alpaca_eval/annotators/base.py,sha256=7STVc8KUCgT0qoiH7VGROg8KLeG6hE-q-wavO574uTI,28020
|
| 27 |
+
alpaca_eval/annotators/pairwise_evaluator.py,sha256=bbXuY_QD5yW6NggAjl6cz2tqY3oeeFz4K9ELY-hoINw,15880
|
| 28 |
+
alpaca_eval/completion_parsers.py,sha256=b31yToNNXCKQnMqNU_n1OUzOm_ckiAaCCxY1w_bmxY4,6482
|
| 29 |
+
alpaca_eval/constants.py,sha256=s0zC5i6VrE2823CIsCR2VuonlCiVbpzVb5HJQTEB5sY,4756
|
| 30 |
+
alpaca_eval/decoders/__init__.py,sha256=XvQ9VFJI1kY_aiC4seOZ-MliBMIbA0tfgS0IUmiPme0,2370
|
| 31 |
+
alpaca_eval/decoders/__pycache__/__init__.cpython-310.pyc,,
|
| 32 |
+
alpaca_eval/decoders/__pycache__/anthropic.cpython-310.pyc,,
|
| 33 |
+
alpaca_eval/decoders/__pycache__/cohere.cpython-310.pyc,,
|
| 34 |
+
alpaca_eval/decoders/__pycache__/huggingface_api.cpython-310.pyc,,
|
| 35 |
+
alpaca_eval/decoders/__pycache__/huggingface_local.cpython-310.pyc,,
|
| 36 |
+
alpaca_eval/decoders/__pycache__/openai.cpython-310.pyc,,
|
| 37 |
+
alpaca_eval/decoders/__pycache__/replicate.cpython-310.pyc,,
|
| 38 |
+
alpaca_eval/decoders/anthropic.py,sha256=z_cdByCzGiIxglOC7Fxg2yZbKgUHYr05oiIBASILZtc,4409
|
| 39 |
+
alpaca_eval/decoders/cohere.py,sha256=9jW8Pjh-_QEuJKDxZcr7RJcyw0LKZNnDyPkRHueDwxs,3423
|
| 40 |
+
alpaca_eval/decoders/huggingface_api.py,sha256=SQs_MWI0d909oq5oVMXBgi02g0jLtrx8u8_Y_hIAdss,3751
|
| 41 |
+
alpaca_eval/decoders/huggingface_local.py,sha256=gJ79MppXR5XcE0ar2nzwaBYF6nH1kczvv2A-abtM0FA,5090
|
| 42 |
+
alpaca_eval/decoders/openai.py,sha256=_D17aF17lVCU276d2JI2zFsAdUZerNIP6i4G9K0aUzQ,12959
|
| 43 |
+
alpaca_eval/decoders/replicate.py,sha256=n7rRQWDviwKT2K1oMsQb3AEDHI0kEt9wRZmZ-4e2Qrk,2440
|
| 44 |
+
alpaca_eval/evaluators_configs/README.md,sha256=Y29kC7CbnnMiuT-4X6TpgWbuD6KgotFf-GiZDnKzf5c,9753
|
| 45 |
+
alpaca_eval/evaluators_configs/alpaca_eval_gpt4/alpaca_eval.txt,sha256=z0us5D-mrHGUS5yiUGWHrXxQlHiiGemKOVCr-dW0Kpg,1204
|
| 46 |
+
alpaca_eval/evaluators_configs/alpaca_eval_gpt4/configs.yaml,sha256=Z2cX05ktVZMH1jZh7xJxEy39YTEA90f2zo1Ypwd8Yj0,270
|
| 47 |
+
alpaca_eval/evaluators_configs/alpaca_eval_gpt4_fn/alpaca_eval_fn.txt,sha256=9zTCMVT1nvo-SCQMoNHfbyAgvQVvstLML4iuuddbYFQ,905
|
| 48 |
+
alpaca_eval/evaluators_configs/alpaca_eval_gpt4_fn/configs.yaml,sha256=cG3P0JjF7HNf9jTXMpmXCtkU3JmdpLu4IhFHqtO-3c8,1135
|
| 49 |
+
alpaca_eval/evaluators_configs/alpaca_farm/chatml_b1_chat_v0_without_inputs.txt,sha256=4VRVSzcJpnryc8yHTx3K3aK4WWFpwZzjKB0gBQMVP1o,1650
|
| 50 |
+
alpaca_eval/evaluators_configs/alpaca_farm/chatml_b1_chat_without_inputs.txt,sha256=Cll_ks6pOhHARQ0yGxFssI4C_umPPJwUxCKv6aX0TRs,5869
|
| 51 |
+
alpaca_eval/evaluators_configs/alpaca_farm/chatml_b1_cot_json_without_inputs.txt,sha256=yZ7au5tYkFdFCgOzbl8gfu8VzKKqK2LMOx2-9Oyxw-A,2475
|
| 52 |
+
alpaca_eval/evaluators_configs/alpaca_farm/chatml_b1_without_inputs.txt,sha256=bQe5XEzsMFMBZXmD21NJwBcf5fhVpnXAm_plQyOonJ4,3721
|
| 53 |
+
alpaca_eval/evaluators_configs/alpaca_farm/chatml_b4_cot_json_without_inputs.txt,sha256=VK2beVTCnIavX-q2i0lWZrAA8cLMI0Efa4P4oaoSHxk,3423
|
| 54 |
+
alpaca_eval/evaluators_configs/alpaca_farm/chatml_b5_diana_without_inputs.txt,sha256=s9T1FPC3yxAexzb0a9SZOzg9444jzrKraYRvNzDSRV0,6849
|
| 55 |
+
alpaca_eval/evaluators_configs/alpaca_farm/chatml_b5_joe_without_inputs.txt,sha256=q-s4owUh0sIGwIiCfyK0Xs8IyOwLS2eHukRyH47XFpM,6797
|
| 56 |
+
alpaca_eval/evaluators_configs/alpaca_farm/chatml_b5_without_inputs.txt,sha256=6gfwH7o3IaZqaOW9bqglvn2HmUzGK7IkCEVreIfGKIc,6700
|
| 57 |
+
alpaca_eval/evaluators_configs/alpaca_farm/configs.yaml,sha256=Dtrmj42kXO3wjeQn5M6rBuDJcS1nIg-eFQs1RC53UuM,6045
|
| 58 |
+
alpaca_eval/evaluators_configs/alpaca_farm/text_b1_v0_without_inputs.txt,sha256=24FS2HDAuG5xEcloqKnUNqdXd_dNbdW4O2_2J3UpA8Y,1016
|
| 59 |
+
alpaca_eval/evaluators_configs/alpaca_farm/text_b1_without_inputs.txt,sha256=IYW9P6ETBgN2F7Ik8qjEollpWTuu92KqORcSF5KuNac,3969
|
| 60 |
+
alpaca_eval/evaluators_configs/alpaca_farm/text_b4_reasoning_without_inputs.txt,sha256=RyfwflTDqRso7HTUZJs_mV0eSyfC9ybMQdT_5SO0XUg,5932
|
| 61 |
+
alpaca_eval/evaluators_configs/alpaca_farm/text_b5_without_inputs.txt,sha256=cv6mHjAODbT1v9eDjI3ToOFMdKmnuUGiDR2jXaiysnI,5370
|
| 62 |
+
alpaca_eval/evaluators_configs/alpaca_farm_greedy_gpt4/chatml_b5_without_inputs.txt,sha256=dr3cjE02RI2kyIKHsqOWyMzp4bwvBBguBNHVKx-tH04,7373
|
| 63 |
+
alpaca_eval/evaluators_configs/alpaca_farm_greedy_gpt4/configs.yaml,sha256=U4sd7U_DNeMAM6Tn5CQM1Jt9nAzzOqypizG7w05Aiww,362
|
| 64 |
+
alpaca_eval/evaluators_configs/aviary_gpt4/aviary_prompt.txt,sha256=BL867OYK2tnxjR2T65kEOtFQLQShlhtC7py8TBUZd7o,1048
|
| 65 |
+
alpaca_eval/evaluators_configs/aviary_gpt4/configs.yaml,sha256=qGy-Ry647x_8jTHD8mCu83zdunWkfMD_P7mnKtdUMQc,324
|
| 66 |
+
alpaca_eval/evaluators_configs/chatgpt/basic_prompt.txt,sha256=rwQQTdGqV2oCmSi9jQWia4iLAR-7vjJ8Yt26ymh_UKU,1116
|
| 67 |
+
alpaca_eval/evaluators_configs/chatgpt/configs.yaml,sha256=z5rMMY7ppnDBkmlKAs0AMaeXciM3t-BL122jxVTK3fk,325
|
| 68 |
+
alpaca_eval/evaluators_configs/chatgpt_fn/basic_function_prompt.txt,sha256=35qjKHOV1dy5PwpQnBY69T1HgR_u_xlx057egWH5Jwk,1197
|
| 69 |
+
alpaca_eval/evaluators_configs/chatgpt_fn/configs.yaml,sha256=u4jeWyEL3YMLmZVSWQHJSF34_UtnwdmS4dX7PHjdhqI,754
|
| 70 |
+
alpaca_eval/evaluators_configs/claude/basic_prompt.txt,sha256=-eqQpv17cZMhcY4NVY2VcFMzyFzkrYrgtilyzzPQvco,1137
|
| 71 |
+
alpaca_eval/evaluators_configs/claude/configs.yaml,sha256=BqutKu7q1JHh3BHVQ1JnZ1LL7-FSjvqxVweQpYAkHj8,327
|
| 72 |
+
alpaca_eval/evaluators_configs/claude_2/configs.yaml,sha256=-2L4ago1fqYygvzfzOyILCqXMvFo6DL3iPYBfezVg04,328
|
| 73 |
+
alpaca_eval/evaluators_configs/claude_ranking/configs.yaml,sha256=fKDNFyy7sfHmlO5kegVfs5RMWxRlCC_-kOiDy5NAXLs,269
|
| 74 |
+
alpaca_eval/evaluators_configs/claude_ranking/ranking_prompt.txt,sha256=OfHk_hUfoJKhH6gJCDr99pzAZlBsR53Ds02vG-Z2a08,1087
|
| 75 |
+
alpaca_eval/evaluators_configs/cohere/configs.yaml,sha256=RtW7RIX_2U5DSrrJ26ZUoTwaRR4li0paw9equb0JLn4,303
|
| 76 |
+
alpaca_eval/evaluators_configs/gpt4/configs.yaml,sha256=3qG3NBGx2uHev1Skl9vcXf1-MC3GY8J8UeLEblESS1M,314
|
| 77 |
+
alpaca_eval/evaluators_configs/guanaco_33b/basic_prompt.txt,sha256=xBgbTZlelyXRLn_Q2X3OLLE4lV_Pg7pq20gVxCVMDdA,1298
|
| 78 |
+
alpaca_eval/evaluators_configs/guanaco_33b/configs.yaml,sha256=si-gfneuNq6FVkGuvETwSeREYTx3S2_3eBh6hSCF_EM,452
|
| 79 |
+
alpaca_eval/evaluators_configs/improved_aviary_gpt4/configs.yaml,sha256=HYsADbFZ_2CWMIQH4RlC0t2KX_l3Ro3gTLgOASzvj2M,322
|
| 80 |
+
alpaca_eval/evaluators_configs/improved_lmsys_gpt4/configs.yaml,sha256=imCB9vrHIJCu1SIHFlGvMS6SJlv6b_M3uqpEJU4Bpik,317
|
| 81 |
+
alpaca_eval/evaluators_configs/lmsys_gpt4/configs.yaml,sha256=AImjL3flznl5i8EHC-OH1CPhnDSToRf0-X9pIZV1QPU,319
|
| 82 |
+
alpaca_eval/evaluators_configs/lmsys_gpt4/lmsys_prompt.txt,sha256=-uJdKpGLh316NJdWlsW3BiTnvlbSVUhZbcJxKmHQRqo,1051
|
| 83 |
+
alpaca_eval/evaluators_configs/oasst_pythia_12b/basic_prompt.txt,sha256=UaRuxfczwfI1keeluht1ZBMnnNRphTIghNkhz-M_Ysk,1054
|
| 84 |
+
alpaca_eval/evaluators_configs/oasst_pythia_12b/configs.yaml,sha256=4bNuCEpLUwL1xR2eOR0udE81lRhcVK4zl6BVstlwNzs,367
|
| 85 |
+
alpaca_eval/evaluators_configs/test/configs.yaml,sha256=UWUcEZBhPwkb7UfPV5T_e69rdNQS2rjDv_1ZefIKhnU,329
|
| 86 |
+
alpaca_eval/evaluators_configs/text_davinci_003/basic_prompt.txt,sha256=lxxVEKg3FjfxeTuJ0QpFVsRSBw4gRXLzUU04xxyUMh0,1017
|
| 87 |
+
alpaca_eval/evaluators_configs/text_davinci_003/configs.yaml,sha256=UWUcEZBhPwkb7UfPV5T_e69rdNQS2rjDv_1ZefIKhnU,329
|
| 88 |
+
alpaca_eval/leaderboards/data_AlpacaEval/alpaca_eval_gpt4_leaderboard.csv,sha256=B1LHUu7P2cNoYH4GaCAYlpRWOwtz-dPabcR-MdHIHEU,3615
|
| 89 |
+
alpaca_eval/leaderboards/data_AlpacaEval/chatgpt_fn_leaderboard.csv,sha256=KJij6-h4bFc04YaY-OO7JSwsd6MlP2pk_DAeH_Be478,969
|
| 90 |
+
alpaca_eval/leaderboards/data_AlpacaEval/claude_leaderboard.csv,sha256=7bJPSJ1J85WZZ8v_g30gJ3rZBL0Ne5i4ySKkxQ6gt2Y,2553
|
| 91 |
+
alpaca_eval/leaderboards/data_AlpacaEval/text_davinci_003_leaderboard.csv,sha256=L8DQ_8Xm02hC0Gq6b-6kQtfxqqRoUC7VseR012xx6hk,351
|
| 92 |
+
alpaca_eval/leaderboards/evaluators/evaluators_leaderboard.csv,sha256=yKhB6F_AMyT5F7GjXQEzjOwwxpEMy5JzuuG4-IXvS0I,2929
|
| 93 |
+
alpaca_eval/main.py,sha256=f6tp808qnPedLm4kj2jojmwjpJWaKgDYcxl9Oqx33Vg,21848
|
| 94 |
+
alpaca_eval/metrics.py,sha256=KcLHfvIxS0l1TLNXZnJqlSZd_rRepreMPsjG8Z2nvRk,1313
|
| 95 |
+
alpaca_eval/models_configs/airoboros-33b/configs.yaml,sha256=RojwP5mDycbxowDd_vDHCOMOKa8t_Lrv34J_bo1ywuM,415
|
| 96 |
+
alpaca_eval/models_configs/airoboros-33b/prompt.txt,sha256=7Len5nRwR3rPmHWgtiRZ5pGavle5XaLP2t5IwRZw2yA,171
|
| 97 |
+
alpaca_eval/models_configs/airoboros-65b/configs.yaml,sha256=wCbPdu0yWeBYnvASjWgtcbm5gpZF5XU0hM54W5su1UQ,415
|
| 98 |
+
alpaca_eval/models_configs/alpaca-7b/configs.yaml,sha256=k2YoxKEb9zXxN7xSGn2GZmul8JSZprU2eLwiUnYXHmE,382
|
| 99 |
+
alpaca_eval/models_configs/alpaca-7b/prompt.txt,sha256=NRAbw20QmXx9km2PIffRc67GUj86V9eIIblEqJklzco,152
|
| 100 |
+
alpaca_eval/models_configs/alpaca-farm-ppo-human/configs.yaml,sha256=JEOapM_OWv44Fyxm-wdBb6C1cji4cBwpl_UtuZKn_4U,433
|
| 101 |
+
alpaca_eval/models_configs/alpaca-farm-ppo-sim-gpt4-20k/configs.yaml,sha256=wy5ibYQ4_BVIv0LdE63g5jc_5pIWWLSRQfsQrpD1A2o,456
|
| 102 |
+
alpaca_eval/models_configs/baichuan-13b-chat/configs.yaml,sha256=t0vri-V1HE_3GQT_K0O2N0zwGumeB2C_DjwXXYHsdkY,417
|
| 103 |
+
alpaca_eval/models_configs/baichuan-13b-chat/prompt.txt,sha256=hHA7taxoeGgAGyIov2caoGgST53HR8WVmsffifuxL-k,29
|
| 104 |
+
alpaca_eval/models_configs/baize-v2-13b/configs.yaml,sha256=TekFFvDsDLkCPhWKgCCEU7GyPW4xQKeq6bZJCt7QmD8,394
|
| 105 |
+
alpaca_eval/models_configs/baize-v2-13b/prompt.txt,sha256=49cS93u95lriRC1ArUlWyqrkbNyDWqUiPi1FFI64udc,109
|
| 106 |
+
alpaca_eval/models_configs/baize-v2-7b/configs.yaml,sha256=6OZB3JFwJr35Yni-ayydjuAKtdTypfI14cPyLDrdz64,390
|
| 107 |
+
alpaca_eval/models_configs/chatglm2-6b/configs.yaml,sha256=uTLieoMKeYWgqMtZIXwoM3HYjWzroPV38D9IWwEjjhM,373
|
| 108 |
+
alpaca_eval/models_configs/chatglm2-6b/prompt.txt,sha256=lvZkvjA8TZb9VpaJOlu0hYMTBVl_4MyTDUUGKVyqokY,43
|
| 109 |
+
alpaca_eval/models_configs/chatgpt/configs.yaml,sha256=MWphKJ1H891W6n313S4UVTfMqjRPo6m3sogiBlQgqWg,196
|
| 110 |
+
alpaca_eval/models_configs/claude-2/configs.yaml,sha256=1REqiOnKxysDbP_w_RzHTzTxnrUERj3kB_GAB1fJ60E,197
|
| 111 |
+
alpaca_eval/models_configs/claude/configs.yaml,sha256=3EdnA1Acpt9E5Ztvbzk4E1ePdeTvUuJcfFvVYVFrm-c,194
|
| 112 |
+
alpaca_eval/models_configs/claude/prompt.txt,sha256=PvC8O9ekfFdmoh0MAWzKtEJyLz7rmqu_BC50YGd1lyc,34
|
| 113 |
+
alpaca_eval/models_configs/cohere-chat/configs.yaml,sha256=ODm5vy59TgTP24YmqTIovlwxGR3m-1V13-thcRtMwjk,205
|
| 114 |
+
alpaca_eval/models_configs/cohere/configs.yaml,sha256=5O301d0otk_QjF3urKF6kryULlB-FGD4DJJGJFdKBzA,199
|
| 115 |
+
alpaca_eval/models_configs/cohere/prompt.txt,sha256=9kTp7EdLbsJld0AetmPMdAyzo5UgyCYsuuEA30rI5JI,13
|
| 116 |
+
alpaca_eval/models_configs/falcon-40b-instruct/configs.yaml,sha256=A1-g5lZKRaMv8sjy4Fa72HwmwqbfatUQr6ctc0OnvRM,435
|
| 117 |
+
alpaca_eval/models_configs/falcon-7b-instruct/configs.yaml,sha256=bS9InlAGuY-4CWvrQF2GFrxwl7_1tROsdHBN3Ot_IBc,431
|
| 118 |
+
alpaca_eval/models_configs/gpt4/chatml_prompt.txt,sha256=arTl2x29spY85yctvxTqcDP3mQfjubCeiTKw-cu1Gc0,100
|
| 119 |
+
alpaca_eval/models_configs/gpt4/configs.yaml,sha256=M27CIEbl5ttgzp8skuSwcDbsAPsOU868LOiJu0dwg2E,178
|
| 120 |
+
alpaca_eval/models_configs/guanaco-13b/configs.yaml,sha256=4cOqkCd5WObgxDxrylD7I7xB3-C8vvN2s9lJOa2tjA4,430
|
| 121 |
+
alpaca_eval/models_configs/guanaco-33b/configs.yaml,sha256=HiuZonrB3iXe3jpQUQkSKeldhBq8PTAkXlw7W_SxMuU,430
|
| 122 |
+
alpaca_eval/models_configs/guanaco-65b/configs.yaml,sha256=pMLykSK0hp6UoGM3w0YLtm9ofNUMgF4_ICbjqy2XbgU,430
|
| 123 |
+
alpaca_eval/models_configs/guanaco-7b/configs.yaml,sha256=vxPzRaJaTkMwHxJiuFlnfiIJBcML3RH-rBvofgxzhPg,425
|
| 124 |
+
alpaca_eval/models_configs/guanaco-7b/prompt.txt,sha256=APH_lUF2II27aqsmv9WPrqqJhUZrvHYJybO-XSXhp0k,195
|
| 125 |
+
alpaca_eval/models_configs/llama-2-13b-chat-hf/configs.yaml,sha256=0ZLLZfAf_lMxsT4vX5tZ6VAXxGo4doo0fBKfct4_hTI,391
|
| 126 |
+
alpaca_eval/models_configs/llama-2-70b-chat-hf-replicate-noprompt/configs.yaml,sha256=vvcLhtC_WQ1_2MvO3rxCFcoocYz1lzqfeCjkfm2UdBo,432
|
| 127 |
+
alpaca_eval/models_configs/llama-2-70b-chat-hf-replicate-noprompt/prompt.txt,sha256=9kTp7EdLbsJld0AetmPMdAyzo5UgyCYsuuEA30rI5JI,13
|
| 128 |
+
alpaca_eval/models_configs/llama-2-70b-chat-hf-replicate/configs.yaml,sha256=-iqGWHe36lPvNyrHmkYYfxn5un4orJQ0geZ0omQc15U,404
|
| 129 |
+
alpaca_eval/models_configs/llama-2-70b-chat-hf-replicate/prompt.txt,sha256=1BgAxYOHvpMoSgD1YDjPm5yAFWZbRf_uRayAhDcMgb4,30
|
| 130 |
+
alpaca_eval/models_configs/llama-2-70b-chat-hf/configs.yaml,sha256=WGoXZCBk55A1bGDC6MHpnf141iv-hc6fBb2JU5YVNuw,373
|
| 131 |
+
alpaca_eval/models_configs/llama-2-7b-chat-hf/configs.yaml,sha256=0R6EYKLXJMQd074Fbm5ifJImdv4STo-V7C0FcRmtBo4,388
|
| 132 |
+
alpaca_eval/models_configs/llama-2-7b-chat-hf/prompt.txt,sha256=JlUi3JsCiHISbsxcmAKY0YV81uoUOgs8rNsducw6ERc,558
|
| 133 |
+
alpaca_eval/models_configs/minotaur-13b/configs.yaml,sha256=MEHthFt8AloykOkY0ppsX2ibhD6njYR_TAawJSKZqxs,429
|
| 134 |
+
alpaca_eval/models_configs/minotaur-13b/prompt.txt,sha256=tqN6XNRzD9DhM5wEafFYCCI2mB1_6mEENWpCOUydprM,186
|
| 135 |
+
alpaca_eval/models_configs/nous-hermes-13b/configs.yaml,sha256=pn7O29arABiT8TFUTthU8oO5Mh9nDg0r-eQZSXkPw1A,407
|
| 136 |
+
alpaca_eval/models_configs/nous-hermes-13b/prompt.txt,sha256=xo9TqyfhIAGjoxRYOMyFxsIwZ1k2fq9lrnnjJ0LQRmk,185
|
| 137 |
+
alpaca_eval/models_configs/oasst-rlhf-llama-33b/configs.yaml,sha256=RpVH_q0JKJne6E0GHsm1er1QFPaICkIOLzLfdaBkt4M,449
|
| 138 |
+
alpaca_eval/models_configs/oasst-sft-llama-33b/configs.yaml,sha256=EihXA4LnHO656XnYZoptUyjLdD9dN45yI3mtIddV8aY,436
|
| 139 |
+
alpaca_eval/models_configs/oasst-sft-llama-33b/prompt.txt,sha256=e4vHUbrNTKpS68p8sK0gBd2KpVRT9HFotvL8DCVQegk,42
|
| 140 |
+
alpaca_eval/models_configs/oasst-sft-pythia-12b/configs.yaml,sha256=oC7UcXtTwldBbSA7-ZpUhRjaToCBTJCOulfd5DXIhcg,458
|
| 141 |
+
alpaca_eval/models_configs/oasst-sft-pythia-12b/prompt.txt,sha256=uMUj-Kfo1PWb8Fj9PHwWb2ESSUL-_lxr-YbL5Z01eCA,51
|
| 142 |
+
alpaca_eval/models_configs/openchat-13b/configs.yaml,sha256=EcTbsNKyLOs2q0DEKaxFyG8UwbIdnpz0JU4g28NczI8,374
|
| 143 |
+
alpaca_eval/models_configs/openchat-13b/prompt.txt,sha256=vnQBS89qcthUFp5CacV-PZ4WsKYrNo8QeUtXU_glgbs,41
|
| 144 |
+
alpaca_eval/models_configs/openchat-v2-13b/configs.yaml,sha256=tNPLMnlHrmzCyQ4_D3zYc9WIh90XFho9ujDVQl4WqKo,403
|
| 145 |
+
alpaca_eval/models_configs/openchat-v2-w-13b/configs.yaml,sha256=qZ8qt-JRKgprfW9Ud8IgfHuxIs7P6_M9xHTsU4R128k,407
|
| 146 |
+
alpaca_eval/models_configs/openchat8192-13b/configs.yaml,sha256=Ahc5nmsaVI5vobbgUNGEB773F1M4k16nPIlOj2QYH74,387
|
| 147 |
+
alpaca_eval/models_configs/opencoderplus-15b/configs.yaml,sha256=WUfx-DUulUjpdcKiLl-ih1pOqMYAUk-e6va-__NXwMM,389
|
| 148 |
+
alpaca_eval/models_configs/pythia-12b-mix-sft/configs.yaml,sha256=Sq2NY9tPJnS1kckOTVNoUgcG9FQwauNQrJp_FeNR69o,438
|
| 149 |
+
alpaca_eval/models_configs/text_davinci_001/configs.yaml,sha256=fK3G_pxpeHbSD3WE0knIGGZgdxBo3k12EhYZysexXkQ,211
|
| 150 |
+
alpaca_eval/models_configs/text_davinci_003/configs.yaml,sha256=nNY1SiewhsPBSHliZkRP91609s2sGHUsyOnk5CRv_Mc,211
|
| 151 |
+
alpaca_eval/models_configs/text_davinci_003/prompt.txt,sha256=ItEGOBsJHb4frai68-HdKRxNQqTsFLwpuxkpIlAKBgU,34
|
| 152 |
+
alpaca_eval/models_configs/ultralm-13b/configs.yaml,sha256=TIfJyJzBGgN2Bpreev2hRDcubPLMvmHtazSMBtwa6-g,401
|
| 153 |
+
alpaca_eval/models_configs/ultralm-13b/prompt.txt,sha256=Sm-9tJ-a_a__SFOWvxTUdoPX9xzcoQ0Bmi7Q_VbO37A,271
|
| 154 |
+
alpaca_eval/models_configs/vicuna-13b-v1.3/configs.yaml,sha256=CZq9E2298VCSs54tUvc-1lZPsoSeQuNC1xhUj1hTjgE,387
|
| 155 |
+
alpaca_eval/models_configs/vicuna-13b/configs.yaml,sha256=8Hym23QJExR043vS1uH4iiXjNJarh0wYcEogcnD9UkI,387
|
| 156 |
+
alpaca_eval/models_configs/vicuna-33b-v1.3/configs.yaml,sha256=d0bZ6b5TPRZEBFS1qWZoONghW9wNNxbasxvUnF7h1f4,387
|
| 157 |
+
alpaca_eval/models_configs/vicuna-7b-v1.3/configs.yaml,sha256=UrmUKNcTIj3rzqS1Ht3lomsqX3_RLCJZjobaEe6hJA0,383
|
| 158 |
+
alpaca_eval/models_configs/vicuna-7b/configs.yaml,sha256=3q2N5Vr09-0ImFh6Ux2IlUU8VU6U6UBu6McoikE2ZZ8,383
|
| 159 |
+
alpaca_eval/models_configs/vicuna-7b/prompt.txt,sha256=xo9TqyfhIAGjoxRYOMyFxsIwZ1k2fq9lrnnjJ0LQRmk,185
|
| 160 |
+
alpaca_eval/models_configs/wizardlm-13b-v1.1/configs.yaml,sha256=MfAQB3jv4-iQEkmxrUGi7gx6rL5XpSIcWiFcPhk0MIs,410
|
| 161 |
+
alpaca_eval/models_configs/wizardlm-13b/configs.yaml,sha256=7cQAwmaRjSxhD80NfKFMtEhYZzsnwRT0XXbgeRNsvDA,394
|
| 162 |
+
alpaca_eval/models_configs/wizardlm-13b/prompt.txt,sha256=xo9TqyfhIAGjoxRYOMyFxsIwZ1k2fq9lrnnjJ0LQRmk,185
|
| 163 |
+
alpaca_eval/plotting.py,sha256=Szsn9WumQn4mcmDYiHDfjeCFaVvN37mpIv_FMULMJ8Q,20680
|
| 164 |
+
alpaca_eval/processors.py,sha256=Gu5kfoZ0vx53JcEbq8n2RGXQbnn3_0w4GreA-e7PfYU,7900
|
| 165 |
+
alpaca_eval/types.py,sha256=3fbYWKPYn6xMFPD80jqRMKdQuYWPONtmoV3yRwJK9wE,283
|
| 166 |
+
alpaca_eval/utils.py,sha256=b6S5diOn3Lz2dLqUcr6Xk8UnKXbmAPucuTVwh9KS53Y,15351
|
venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/REQUESTED
ADDED
|
File without changes
|
venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: bdist_wheel (0.41.0)
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py3-none-any
|
| 5 |
+
|
venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/entry_points.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[console_scripts]
|
| 2 |
+
alpaca_eval = alpaca_eval.main:main
|
venv/lib/python3.10/site-packages/alpaca_eval-0.2.6.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
alpaca_eval
|
venv/lib/python3.10/site-packages/apiclient/__init__.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Retain apiclient as an alias for googleapiclient."""
|
| 2 |
+
|
| 3 |
+
from googleapiclient import channel, discovery, errors, http, mimeparse, model
|
| 4 |
+
|
| 5 |
+
try:
|
| 6 |
+
from googleapiclient import sample_tools
|
| 7 |
+
except ImportError:
|
| 8 |
+
# Silently ignore, because the vast majority of consumers won't use it and
|
| 9 |
+
# it has deep dependence on oauth2client, an optional dependency.
|
| 10 |
+
sample_tools = None
|
| 11 |
+
from googleapiclient import schema
|
| 12 |
+
|
| 13 |
+
_SUBMODULES = {
|
| 14 |
+
"channel": channel,
|
| 15 |
+
"discovery": discovery,
|
| 16 |
+
"errors": errors,
|
| 17 |
+
"http": http,
|
| 18 |
+
"mimeparse": mimeparse,
|
| 19 |
+
"model": model,
|
| 20 |
+
"sample_tools": sample_tools,
|
| 21 |
+
"schema": schema,
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
import sys
|
| 25 |
+
|
| 26 |
+
for module_name, module in _SUBMODULES.items():
|
| 27 |
+
sys.modules["apiclient.%s" % module_name] = module
|
venv/lib/python3.10/site-packages/apiclient/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (758 Bytes). View file
|
|
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/ISSUE_TEMPLATE/bug_report.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: Bug report
|
| 3 |
+
about: Create a bug report to help us improve CUTLASS
|
| 4 |
+
title: "[BUG]"
|
| 5 |
+
labels: "? - Needs Triage, bug"
|
| 6 |
+
assignees: ''
|
| 7 |
+
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
**Describe the bug**
|
| 11 |
+
A clear and concise description of what the bug is.
|
| 12 |
+
|
| 13 |
+
**Steps/Code to reproduce bug**
|
| 14 |
+
Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.
|
| 15 |
+
|
| 16 |
+
**Expected behavior**
|
| 17 |
+
A clear and concise description of what you expected to happen.
|
| 18 |
+
|
| 19 |
+
**Environment details (please complete the following information):**
|
| 20 |
+
- Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)]
|
| 21 |
+
|
| 22 |
+
**Additional context**
|
| 23 |
+
Add any other context about the problem here.
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/ISSUE_TEMPLATE/documentation_request.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: Documentation request
|
| 3 |
+
about: Report incorrect or needed documentation to improve CUTLASS
|
| 4 |
+
title: "[DOC]"
|
| 5 |
+
labels: "? - Needs Triage, documentation"
|
| 6 |
+
assignees: ''
|
| 7 |
+
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
## Report incorrect documentation
|
| 11 |
+
|
| 12 |
+
**Location of incorrect documentation**
|
| 13 |
+
Provide links and line numbers if applicable.
|
| 14 |
+
|
| 15 |
+
**Describe the problems or issues found in the documentation**
|
| 16 |
+
A clear and concise description of what you found to be incorrect.
|
| 17 |
+
|
| 18 |
+
**Steps taken to verify documentation is incorrect**
|
| 19 |
+
List any steps you have taken:
|
| 20 |
+
|
| 21 |
+
**Suggested fix for documentation**
|
| 22 |
+
Detail proposed changes to fix the documentation if you have any.
|
| 23 |
+
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
## Report needed documentation
|
| 27 |
+
|
| 28 |
+
**Report needed documentation**
|
| 29 |
+
A clear and concise description of what documentation you believe it is needed and why.
|
| 30 |
+
|
| 31 |
+
**Describe the documentation you'd like**
|
| 32 |
+
A clear and concise description of what you want to happen.
|
| 33 |
+
|
| 34 |
+
**Steps taken to search for needed documentation**
|
| 35 |
+
List any steps you have taken:
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/ISSUE_TEMPLATE/feature_request.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: Feature request
|
| 3 |
+
about: Suggest an idea for CUTLASS
|
| 4 |
+
title: "[FEA]"
|
| 5 |
+
labels: "? - Needs Triage, feature request"
|
| 6 |
+
assignees: ''
|
| 7 |
+
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
**Is your feature request related to a problem? Please describe.**
|
| 11 |
+
A clear and concise description of what the problem is. Ex. I wish I could use CUTLASS to do [...]
|
| 12 |
+
|
| 13 |
+
**Describe the solution you'd like**
|
| 14 |
+
A clear and concise description of what you want to happen.
|
| 15 |
+
|
| 16 |
+
**Describe alternatives you've considered**
|
| 17 |
+
A clear and concise description of any alternative solutions or features you've considered.
|
| 18 |
+
|
| 19 |
+
**Additional context**
|
| 20 |
+
Add any other context, code examples, or references to existing implementations about the feature request here.
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/ISSUE_TEMPLATE/submit_question.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: Submit question
|
| 3 |
+
about: Ask a general question about CUTLASS
|
| 4 |
+
title: "[QST]"
|
| 5 |
+
labels: "? - Needs Triage, question"
|
| 6 |
+
assignees: ''
|
| 7 |
+
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
**What is your question?**
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/workflows/labeler.yml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: "Pull Request Labeler"
|
| 2 |
+
on:
|
| 3 |
+
- pull_request_target
|
| 4 |
+
|
| 5 |
+
jobs:
|
| 6 |
+
triage:
|
| 7 |
+
runs-on: ubuntu-latest
|
| 8 |
+
steps:
|
| 9 |
+
- uses: actions/labeler@main
|
| 10 |
+
with:
|
| 11 |
+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/workflows/new-issues-to-triage-projects.yml
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Auto Assign New Issues to Triage Project
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
issues:
|
| 5 |
+
types: [opened]
|
| 6 |
+
|
| 7 |
+
env:
|
| 8 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 9 |
+
|
| 10 |
+
jobs:
|
| 11 |
+
assign_one_project:
|
| 12 |
+
runs-on: ubuntu-latest
|
| 13 |
+
name: Assign to New Issues to Triage Project
|
| 14 |
+
steps:
|
| 15 |
+
- name: Process bug issues
|
| 16 |
+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
|
| 17 |
+
if: contains(github.event.issue.labels.*.name, 'bug') && contains(github.event.issue.labels.*.name, '? - Needs Triage')
|
| 18 |
+
env:
|
| 19 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 20 |
+
GITHUB_PROJECT_URL: https://github.com/NVIDIA/cutlass
|
| 21 |
+
GITHUB_PROJECT_COLUMN_NAME: 'Needs prioritizing'
|
| 22 |
+
- name: Process feature issues
|
| 23 |
+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
|
| 24 |
+
if: contains(github.event.issue.labels.*.name, 'feature request') && contains(github.event.issue.labels.*.name, '? - Needs Triage')
|
| 25 |
+
env:
|
| 26 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 27 |
+
GITHUB_PROJECT_URL: https://github.com/NVIDIA/cutlass
|
| 28 |
+
GITHUB_PROJECT_COLUMN_NAME: 'Needs prioritizing'
|
| 29 |
+
- name: Process other issues
|
| 30 |
+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
|
| 31 |
+
if: contains(github.event.issue.labels.*.name, '? - Needs Triage') && (!contains(github.event.issue.labels.*.name, 'bug') && !contains(github.event.issue.labels.*.name, 'feature request'))
|
| 32 |
+
env:
|
| 33 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 34 |
+
GITHUB_PROJECT_URL: https://github.com/NVIDIA/cutlass
|
| 35 |
+
GITHUB_PROJECT_COLUMN_NAME: 'Needs prioritizing'
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.github/workflows/stale.yml
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Mark inactive issues and pull requests
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
schedule:
|
| 5 |
+
- cron: "0 * * * *"
|
| 6 |
+
|
| 7 |
+
jobs:
|
| 8 |
+
mark-inactive-30d:
|
| 9 |
+
runs-on: ubuntu-latest
|
| 10 |
+
steps:
|
| 11 |
+
- name: Mark 30 day inactive issues and pull requests
|
| 12 |
+
uses: actions/stale@v3
|
| 13 |
+
with:
|
| 14 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
| 15 |
+
stale-issue-message: >
|
| 16 |
+
This issue has been labeled `inactive-30d` due to no recent activity in the past 30 days.
|
| 17 |
+
Please close this issue if no further response or action is needed.
|
| 18 |
+
Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.
|
| 19 |
+
This issue will be labeled `inactive-90d` if there is no activity in the next 60 days.
|
| 20 |
+
stale-issue-label: "inactive-30d"
|
| 21 |
+
exempt-issue-labels: "0 - Blocked,0 - Backlog,good first issue"
|
| 22 |
+
days-before-issue-stale: 30
|
| 23 |
+
days-before-issue-close: -1
|
| 24 |
+
stale-pr-message: >
|
| 25 |
+
This PR has been labeled `inactive-30d` due to no recent activity in the past 30 days.
|
| 26 |
+
Please close this PR if it is no longer required.
|
| 27 |
+
Otherwise, please respond with a comment indicating any updates.
|
| 28 |
+
This PR will be labeled `inactive-90d` if there is no activity in the next 60 days.
|
| 29 |
+
stale-pr-label: "inactive-30d"
|
| 30 |
+
exempt-pr-labels: "0 - Blocked,0 - Backlog,good first issue"
|
| 31 |
+
days-before-pr-stale: 30
|
| 32 |
+
days-before-pr-close: -1
|
| 33 |
+
operations-per-run: 50
|
| 34 |
+
mark-inactive-90d:
|
| 35 |
+
runs-on: ubuntu-latest
|
| 36 |
+
steps:
|
| 37 |
+
- name: Mark 90 day inactive issues and pull requests
|
| 38 |
+
uses: actions/stale@v3
|
| 39 |
+
with:
|
| 40 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
| 41 |
+
stale-issue-message: >
|
| 42 |
+
This issue has been labeled `inactive-90d` due to no recent activity in the past 90 days.
|
| 43 |
+
Please close this issue if no further response or action is needed.
|
| 44 |
+
Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.
|
| 45 |
+
stale-issue-label: "inactive-90d"
|
| 46 |
+
exempt-issue-labels: "0 - Blocked,0 - Backlog,good first issue"
|
| 47 |
+
days-before-issue-stale: 90
|
| 48 |
+
days-before-issue-close: -1
|
| 49 |
+
stale-pr-message: >
|
| 50 |
+
This PR has been labeled `inactive-90d` due to no recent activity in the past 90 days.
|
| 51 |
+
Please close this PR if it is no longer required.
|
| 52 |
+
Otherwise, please respond with a comment indicating any updates.
|
| 53 |
+
stale-pr-label: "inactive-90d"
|
| 54 |
+
exempt-pr-labels: "0 - Blocked,0 - Backlog,good first issue"
|
| 55 |
+
days-before-pr-stale: 90
|
| 56 |
+
days-before-pr-close: -1
|
| 57 |
+
operations-per-run: 50
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PyCache files
|
| 2 |
+
__pycache__/
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/.gitmodules
ADDED
|
File without changes
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/CHANGELOG.md
ADDED
|
@@ -0,0 +1,377 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NVIDIA CUTLASS Changelog
|
| 2 |
+
|
| 3 |
+
## [3.2.2](https://github.com/NVIDIA/cutlass/releases/tag/v3.2.2) (2023-10-25)
|
| 4 |
+
* Fixes illegal memory access issue [1138](https://github.com/NVIDIA/cutlass/issues/1138) hit by FlashAttention tests in PyTorch.
|
| 5 |
+
|
| 6 |
+
## [3.2.1](https://github.com/NVIDIA/cutlass/releases/tag/v3.2.1) (2023-09-22)
|
| 7 |
+
* Python support SM90 Epilogue Visitor Tree (EVT) on top of the C++ support released in 3.2.0.
|
| 8 |
+
* SM80 EVT support in C++ and Python.
|
| 9 |
+
* Other SM90 epilogue improvements.
|
| 10 |
+
* Splitting CUTLASS library into smaller units based on operation, arch and datatypes. See [1105](https://github.com/NVIDIA/cutlass/discussions/1105) for details.
|
| 11 |
+
* Making `tools/library/scripts` packageable - `tools/library/scripts` is now moving to `python/cutlass_library`. See the Python [README](/python/README.md) for details.
|
| 12 |
+
* SM90 TF32 kernel improvements for all layouts.
|
| 13 |
+
* SM90 rasterization direction support in the CUTLASS profiler.
|
| 14 |
+
* Improvement for CUTLASS profiler build times.
|
| 15 |
+
* Remove Python-C++ bindings.
|
| 16 |
+
|
| 17 |
+
## [3.2.0](https://github.com/NVIDIA/cutlass/releases/tag/v3.2.0) (2023-08-03)
|
| 18 |
+
|
| 19 |
+
* New warp-specialized persistent FP8 GEMM kernel [kernel schedules](/include/cutlass/gemm/kernel/sm90_gemm_tma_warpspecialized_cooperative.hpp) and [mainloops](/include/cutlass/gemm/collective/sm90_mma_tma_gmma_ss_warpspecialized_fp8.hpp) targeting Hopper architecture that achieve great performance with TMA, WGMMA, and threadblock clusters. An example showcasing [Hopper warp-specialized FP8 GEMMs](/examples/54_hopper_fp8_warp_specialized_gemm). FP8 GEMMs come with a fast accumulation mode. When enabled, problem execution might be faster but at the cost of lower accuracy because intermediate results will not periodically be promoted to a higher precision.
|
| 20 |
+
* New [Epilogue Visitor Tree (EVT)](/examples/49_hopper_gemm_with_collective_builder/49_collective_builder.cu) support for Hopper TMA epilogues. EVTs allows for user-defined customized epilogue fusion patterns without having to write a new epilogue.
|
| 21 |
+
* [Stream-K](/include/cutlass/gemm/kernel/sm90_tile_scheduler_stream_k.hpp) feature for Hopper. Note that this is only a functional implementation of stream-K, and should not be used for performance comparison. Optimizations are expected in a future release.
|
| 22 |
+
* Improved CTA rasterization and support for CTA swizzling for Hopper kernels using the [Tile Scheduler](/include/cutlass/gemm/kernel/sm90_tile_scheduler.hpp).
|
| 23 |
+
* Improved performance for [warp-specialized TensorFloat-32 (TF32) GEMM kernels](test/unit/gemm/device/sm90_gemm_tf32_tf32_f32_tensor_op_f32_gmma_rs_cluster_warpspecialized.cu) targeting Hopper TMA.
|
| 24 |
+
* [Hopper GEMM+Permute](/examples/53_hopper_gemm_permute/53_hopper_gemm_permute.cu), an example of fusing tensor reordering (permutation) with GEMM mainloop or epilogue.
|
| 25 |
+
* New CUTLASS 2D Convolution Python interface. New [example](/examples/python/03_basic_conv2d.ipynb) here.
|
| 26 |
+
* Support for Windows (MSVC) builds. Tested with Visual Studio 2019 v16.11.27 on Windows 10.0.
|
| 27 |
+
* Optimal performance using [**CUDA 12.2u1**](https://developer.nvidia.com/cuda-downloads)
|
| 28 |
+
* Updates and bugfixes from the community (thanks!)
|
| 29 |
+
|
| 30 |
+
## [3.1.0](https://github.com/NVIDIA/cutlass/releases/tag/v3.1.0) (2023-04-14)
|
| 31 |
+
* New CUTLASS Python interface that aims to provide an ease-of-use interface for instantiating, emitting, compiling, and running CUTLASS kernels via Python. More details [here](/python/README.md) and new [examples](/examples/python).
|
| 32 |
+
* New [efficient epilogues](test/unit/gemm/device/sm90_gemm_f16_f16_f16_tensor_op_f32_cluster_warpspecialized_cooperative.cu#L783) using TMA for Hopper.
|
| 33 |
+
* Support for [fused epilogues](test/unit/gemm/device/sm90_gemm_f16_f16_f16_tensor_op_f32_cluster_warpspecialized_cooperative_bias_elementwise.cu), such Bias, ReLU and GELU, using the new efficient epilogues.
|
| 34 |
+
* New [warp-specialized TensorFloat-32 (TF32) GEMM kernels](test/unit/gemm/device/sm90_gemm_tf32_tf32_f32_tensor_op_f32_gmma_rs_cluster_warpspecialized.cu) targeting Hopper TMA.
|
| 35 |
+
* New [*warp-specialized persistent cooperative*](include/cutlass/gemm/kernel/sm90_gemm_tma_warpspecialized_cooperative.hpp) kernel design that allows for larger tile sizes and improves performance on Hopper.
|
| 36 |
+
* An [example](examples/51_hopper_gett) showcasing GEMM-Like Tensor-Tensor Contraction (GETT) capability on Hopper.
|
| 37 |
+
* Epilogue builders. Similar to mainloop builders (see [example 49](/examples/49_hopper_gemm_with_collective_builder/49_collective_builder.cu)), epilogue builders aim to generate the best-possible epilogue while exposing incremental opt-ins for greater customization.
|
| 38 |
+
* Profiler support for overriding kernel and epilogue builder auto schedules for 3.x API kernels, allowing specific policies to be run in the CUTLASS profiler.
|
| 39 |
+
* Performance optimizations for the [*warp-specialized persistent ping-pong*](include/cutlass/gemm/kernel/sm90_gemm_tma_warpspecialized_pingpong.hpp) kernel.
|
| 40 |
+
* Changes to the [GEMM API 3.x](media/docs/gemm_api_3x.md), involving the host-facing arguments and the underlying `Params` structs.
|
| 41 |
+
* [FMHA Backward Pass](examples/41_fused_multi_head_attention/fused_multi_head_attention_backward.cu) from Meta xFormers.
|
| 42 |
+
* [Streamk GEMM with Broadcast](examples/47_ampere_gemm_universal_streamk/ampere_gemm_universal_streamk_broadcast.cu) enables epilogue broadcast with StreamK GEMM.
|
| 43 |
+
* [Batched B2B GEMM](examples/13_two_tensor_op_fusion) now can run multiple Back-to-Back GEMM with the same problem size in parallel.
|
| 44 |
+
* [Batched Strided GEMV](test/unit/gemm/device/gemv.cu) support both row major and column major input matrix.
|
| 45 |
+
* [Permute + GEMM fusion](examples/39_gemm_permute) can fuse Permute with following GEMM now. Before, we only support fusing GEMM with Permute in the epilogue.
|
| 46 |
+
* [Row Broadcast](include/cutlass/epilogue/threadblock/predicated_tile_iterator_row_broadcast.h) can be fused in the epilogue.
|
| 47 |
+
* The GitHub branch is renamed from `master` to `main` in this release.
|
| 48 |
+
* Optimal performance using [**CUDA 12.1**](https://developer.nvidia.com/cuda-downloads)
|
| 49 |
+
* Updates and bugfixes from the community (thanks!)
|
| 50 |
+
|
| 51 |
+
## [3.0.0](https://github.com/NVIDIA/cutlass/releases/tag/v3.0.0) (2023-01-23)
|
| 52 |
+
* [CuTe](/media/docs/cute/00_quickstart.md), a [new core library and backend](/include/cute) for CUTLASS 3.0 that defines a single Layout vocabulary type and an associated algebra of layouts for a much more expressive and composable abstraction for tensors, sets of parallel agents, and operations by said agents on tensors.
|
| 53 |
+
* [A new conceptual operation hierarchy](media/docs/cutlass_3x_design.md) that replaces the architecture-centric hierarchy of CUTLASS 2.x and [documentation for CUTLASS 3.0's GEMM API changes](/media/docs/gemm_api_3x.md).
|
| 54 |
+
* Strict API backwards compatibility that exposes both 2.x and 3.x API kernels through the same [`device::GemmUniversalAdapter`](include/cutlass/gemm/device/gemm_universal_adapter.h) and [`kernel::GemmUniversal`](include/cutlass/gemm/kernel/gemm_universal.hpp) types, allowing users to include both APIs in the same translation units. More information can be found in the [3.x backwards compatibility section](media/docs/cutlass_3x_backwards_compatibility.md).
|
| 55 |
+
* Updates to [Functionality](media/docs/functionality.md) which directs users on which kernels are supported via CUTLASS-2 and CUTLASS-3.
|
| 56 |
+
* Updates to [Compatibility](/README.md#compatibility) Section regarding supported compilers, operating systems, CUDA Toolkits, Hardware Architectures and [Target Architecture](/README.md#Target-Architecture).
|
| 57 |
+
* New warp-specialized GEMM [kernel schedules](include/cutlass/gemm/kernel/sm90_gemm_tma_warpspecialized.hpp) and [mainloops](include/cutlass/gemm/collective/sm90_mma_tma_gmma_ss_warpspecialized.hpp) targeting Hopper architecture that achieve great performance with TMA, WGMMA, and threadblock clusters.
|
| 58 |
+
* Extensions to CUTLASS profiler to support threadblock cluster shapes in library and profiler tile configurations.
|
| 59 |
+
* [CUTLASS library integration](/tools/library/src/gemm_operation_3x.hpp) for 3.x API kernels built through the new `CollectiveBuilder` API, enabling CUTLASS profiler.
|
| 60 |
+
* Support for [Hopper GEMMs](examples/48_hopper_warp_specialized_gemm) through the new 3.0 API with CuTe-based exposure of the Hopper [Tensor Memory Accelerator](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cp-async-bulk-tensor) and [WGMMA Tensor Core](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions) features.
|
| 61 |
+
* Set of examples that demonstrate the usage of the new 3.0 API to easily build GEMM kernels targeting Hopper: examples [48](examples/48_hopper_warp_specialized_gemm), [49](examples/49_hopper_gemm_schedules_with_collective_builder), and [50](examples/50_hopper_gemm_with_epilogue_swizzle).
|
| 62 |
+
|
| 63 |
+
## [2.11.0](https://github.com/NVIDIA/cutlass/releases/tag/v2.11.0) (2022-11-19)
|
| 64 |
+
* [Stream-K](/examples/47_ampere_gemm_universal_streamk), which is a new general way to do split-K. It can not only improve performance, but can also significantly reduce the number of tile sizes that need to be profiled to find the best one.
|
| 65 |
+
* [Fused multi-head attention Kernel](/examples/41_fused_multi_head_attention). It has two variants: one uses batched GEMM for the fixed sequence length, and the other one uses group GEMM for the variable sequence length. Both versions just need one kernel.
|
| 66 |
+
* [Dual GEMM](/examples/45_dual_gemm), which can fuse A x B and A x C into one kernel. Two GEMMs has no producer-consumer dependency.
|
| 67 |
+
* Hopper improves [double precision matrix multiplication](/test/unit/gemm/device/gemm_f64n_f64t_f64t_tensor_op_f64_sm90.cu) by 2x compared to Ampere at iso-clocks. It is supported since CUDA 11.8.
|
| 68 |
+
* [BLAS3](/test/unit/gemm/device/hemm_cf64_cf64_cf64_tensor_op_f64_sm90.cu) functions with Hoppers new double precision matrix multiplication instructions.
|
| 69 |
+
* [ELL Block Sparse GEMM](/examples/43_ell_block_sparse_gemm), which uses an [ELL matrix](https://developer.nvidia.com/blog/accelerating-matrix-multiplication-with-block-sparse-format-and-nvidia-tensor-cores/) to describe the sparsity of A matrix. B and output matrices are still dense. The block size can be arbitary.
|
| 70 |
+
* Optimized [Group Conv](/examples/42_ampere_tensorop_group_conv) for SingleGroup mode, which requires that the output channel per group is a multiple of Threadblock tile N.
|
| 71 |
+
* [Optimized DepthWise Conv](/examples/46_depthwise_simt_conv2dfprop/depthwise_simt_conv2dfprop.cu). Two new modes are added
|
| 72 |
+
* [kOptimized](/test/unit/conv/device/depthwise_conv2d_fprop_direct_conv_f16nhwc_f16nhwc_f16nhwc_simt_f16_sm60.cu) - use direct conv to compute instead of implicit GEMM.
|
| 73 |
+
* The restrictions are: 1) input ,output channel and group number should be multiple of (128 / sizeof(input element)). 2) The input filter size should be the same as the template parameter configuration.
|
| 74 |
+
* [kFixedStrideDilation](/test/unit/conv/device/depthwise_conv2d_fprop_direct_conv_fixed_stride_dilation_f16nhwc_f16nhwc_f16nhwc_simt_f16_sm60.cu) - which puts stride and dilation into templates to further improve the performance. In this mode, kernel persistents some inputs into register to squeeze more performance, so large filter/stride/dilation is not recommanded.
|
| 75 |
+
* The restrictions are: 1) input, output channel and group number should be multiple of (128 / sizeof(input element)). 2) input filter size, stride, dilation should same as the template parameter configuration.
|
| 76 |
+
* [Scripts](/examples/44_multi_gemm_ir_and_codegen) to fuse multiple back-to-back GEMM. Its implementation was discussed in a GTC'22 Spring [talk](https://www.nvidia.com/en-us/on-demand/session/gtcspring22-s41606/).
|
| 77 |
+
* [FP8 data type definition](/include/cutlass/float8.h) and [conversion routines](/include/cutlass/numeric_conversion.h#L1274-2115).
|
| 78 |
+
* Updates and bugfixes from the community (thanks!). Big shout out to Meta's [xFormers](https://github.com/facebookresearch/xformers).
|
| 79 |
+
|
| 80 |
+
* **Deprecation announcement:** CUTLASS plans to deprecate the following:
|
| 81 |
+
* Maxwell and Pascal GPU architectures
|
| 82 |
+
* Ubuntu 16.04
|
| 83 |
+
* CUDA 10.2
|
| 84 |
+
|
| 85 |
+
## [2.10.0](https://github.com/NVIDIA/cutlass/releases/tag/v2.10.0) (2022-08-23)
|
| 86 |
+
* [CUTLASS Python](/examples/40_cutlass_py) now supports GEMM, CONV, Group GEMM for different data types as well as different epilogue flavours.
|
| 87 |
+
* Optimizations for CUTLASS's [Grouped GEMM](examples/24_gemm_grouped/gemm_grouped.cu) kernel. Threadblock scheduling part is improved. Some computation can be moved to the host side if applicable. [Grouped Syr2k](examples/38_syr2k_grouped/syr2k_grouped.cu) kernels are added, too.
|
| 88 |
+
* Optimizations for [GEMM+Softmax](examples/35_gemm_softmax). All the reduction computation is fused into the previous GEMM. More template arguments are provided to fine tune the performance.
|
| 89 |
+
* [Grouped GEMM for Multihead Attention](examples/41_multi_head_attention). This general group gemm based MHA does not require the sequence length of all GEMMs to be the same which makes it most useful for natural language processing.
|
| 90 |
+
* [GEMM + Layer norm fusion for Ampere](examples/37_gemm_layernorm_gemm_fusion/) splits the layernorm into two parts and both of them can be fused into the GEMMs before and after separately. In addition to use square sum to compute variance of layernorm, [Shift-K](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Computing_shifted_data) is provided if square sum raise numerical issues.
|
| 91 |
+
* [GEMM Epilogue Permutation Fusion](examples/39_gemm_permute) can apply user provided permutation layout mapping in the GEMM epilogue.
|
| 92 |
+
* [Grouped convolution targeting implicit GEMM](test/unit/conv/device/group_conv2d_fprop_implicit_gemm_f16nhwc_f16nhwc_f16nhwc_tensor_op_f32_sm80.cu) introduces the first group convolution implementation to CUTLASS. It is an Analytical implementation, not an Optimized. The restrictions are: 1) input and output channel number should be multiple of group number. 2) split-K is not supported. The implementation has 2 modes:
|
| 93 |
+
* kSingleGroup: output channel per group is multiple of Threadblock tile N.
|
| 94 |
+
* kMultipleGroup: Threadblock tile N is multiple of output channel per group.
|
| 95 |
+
* [Depthwise separable convolution](test/unit/conv/device/depthwise_fprop_implicit_gemm_f16nhwc_f16nhwc_f16nhwc_simt_f16_sm60.cu) introduces the first depthwise convolution which is also Analytical for now. The restrictions are: 1) SIMT only 2) No split-K 3) input channel equals to output channel equals to group number.
|
| 96 |
+
* Standalone [Layernorm](/tools/util/include/cutlass/util/device_layernorm.h) and [Pooling](/tools/util/include/cutlass/util/device_nhwc_pooling.h) kernels.
|
| 97 |
+
* [Back-to-back GEMM/CONV](examples/13_two_tensor_op_fusion) relaxes the requirement that the first GEMM K dimension needs to be the multiple of Threadblock Tile K dimension.
|
| 98 |
+
* Optimal performance using [**CUDA 11.6u2**](https://developer.nvidia.com/cuda-downloads)
|
| 99 |
+
* Updates and bugfixes from the community (thanks!)
|
| 100 |
+
|
| 101 |
+
## [2.9.0](https://github.com/NVIDIA/cutlass/releases/tag/v2.9.0) (2022-04-21)
|
| 102 |
+
|
| 103 |
+
* [First layer Convolution kernels](/test/unit/conv/device/conv2d_fprop_fixed_channels_f16nhwc_f16nhwc_f16nhwc_tensor_op_f32_sm80.cu) specialized for small channel counts and reduced alignment
|
| 104 |
+
* [Few channels](/include/cutlass/conv/threadblock/conv2d_fprop_activation_tile_access_iterator_few_channels.h) specialization for reduced alignment capabilities
|
| 105 |
+
* [Fixed channels](/include/cutlass/conv/threadblock/conv2d_fprop_activation_tile_access_iterator_fixed_channels.h) further specialized when channel count perfectly matches the access vector size
|
| 106 |
+
* [Unit tests](/test/unit/conv/device/conv2d_fprop_few_channels_f16nhwc_f16nhwc_f16nhwc_tensor_op_f32_sm80.cu)
|
| 107 |
+
* [Python-based instance emitter](/python/cutlass_library/generator.py) in the CUTLASS Library and support in the Profiler
|
| 108 |
+
* [BLAS3](https://docs.nvidia.com/cuda/cublas/index.html#cublas-level-3-function-reference) operators accelerated by Tensor Cores
|
| 109 |
+
* Supported types: f32, cf32, f64, cf64, tf32x3, complex tf32x3
|
| 110 |
+
* [HERK](/test/unit/gemm/device/her2k_cf32h_cf32n_tensor_op_fast_f32_sm80.cu) with [emitter](/tools/library/scripts/rank_k_operation.py)
|
| 111 |
+
* [SYRK](/test/unit/gemm/device/syrk_f32n_f32t_tensor_op_fast_f32_sm80.cu) with [emitter](/tools/library/scripts/rank_k_operation.py)
|
| 112 |
+
* [SYMM](/test/unit/gemm/device/symm_f32n_f32n_tensor_op_fast_f32_ls_sm80.cu) with [emitter](/tools/library/scripts/symm_operation.py)
|
| 113 |
+
* [TRMM](/test/unit/gemm/device/trmm_f32n_f32t_f32t_tensor_op_fast_f32_ls_sm80.cu) with [emitter](/tools/library/scripts/trmm_operation.py)
|
| 114 |
+
* [Unit tests](/test/unit/gemm/device/testbed_rank_k_universal.h)
|
| 115 |
+
* [CUTLASS Python](/examples/40_cutlass_py) demonstrating JIT compilation of CUTLASS kernels and a Python-based runtime using [CUDA Python](https://developer.nvidia.com/cuda-python)
|
| 116 |
+
* [Python-based runtime](/tools/library/scripts/rt.py) interoperable with existing emitters
|
| 117 |
+
* [GEMM + Softmax example](/examples/35_gemm_softmax)
|
| 118 |
+
* [Gather and Scatter Fusion with GEMM](/examples/36_gather_scatter_fusion) can gather inputs and scatters outputs based on indices vectors in the same GEMM kernel.
|
| 119 |
+
* It can select random rows in a row major matrix.
|
| 120 |
+
* It can select random columns in a column major matrix.
|
| 121 |
+
* [Back-to-back GEMM/CONV](examples/13_two_tensor_op_fusion) fully supports buffering the first GEMM/CONV results in the shared memory for the latter one to use. It can eliminate register spill when the tile size is big. Additionally, bias vector add is supported in the first GEMM/CONV.
|
| 122 |
+
* Supported kernels: GEMM and CONV.
|
| 123 |
+
* Supported types: fp16 and int8.
|
| 124 |
+
* Supported architectures: Turing and Ampere.
|
| 125 |
+
* [Transposed Convolution](/examples/34_transposed_conv2d) (a.k.a Deconvolution) support which reuses Dgrad implementation.
|
| 126 |
+
* [Utility functions](/tools/util/include/cutlass/util) that can pad NHWC and convert between NCHW and NHWC.
|
| 127 |
+
* [Small alignment implicit gemm](https://github.com/NVIDIA/cutlass/issues/242) support for Fprop/Dgrad/Wgrad so that padding is no longer mandated to use tensor cores in these kernels.
|
| 128 |
+
* Epilogue enhancement:
|
| 129 |
+
* Eliminate bank conflicts in int8 tensor core kernels.
|
| 130 |
+
* Half2 usage if epilogue compute type is fp16.
|
| 131 |
+
* More activation functions: Silu, Hardswish, Leaky Relu.
|
| 132 |
+
* New elementwise fusion pattern for [residual block](/include/cutlass/epilogue/thread/linear_combination_residual_block.h).
|
| 133 |
+
* [Group GEMM](/examples/24_gemm_grouped) thread block number calculation fix which helps to launch the intended number of threadblocks to fully occupy the GPUs.
|
| 134 |
+
* [Parallel GEMM splitk](https://github.com/NVIDIA/cutlass/pull/277) support in the CUTLASS profiler.
|
| 135 |
+
* Optimal performance using [**CUDA 11.6u2**](https://developer.nvidia.com/cuda-downloads)
|
| 136 |
+
* Updates and bugfixes from the community (thanks!)
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
## [2.8.0](https://github.com/NVIDIA/cutlass/releases/tag/v2.8.0) (2021-11-19)
|
| 140 |
+
|
| 141 |
+
* **TF32x3:** emulated single-precision using Tensor Cores
|
| 142 |
+
* 45+ TFLOPs on NVIDIA A100
|
| 143 |
+
* [GEMM SDK example](/examples/27_ampere_3xtf32_fast_accurate_tensorop_gemm/27_ampere_3xtf32_fast_accurate_tensorop_gemm.cu) (real)
|
| 144 |
+
* [COMPLEX GEMM SDK example](/examples/29_ampere_3xtf32_fast_accurate_tensorop_complex_gemm/29_ampere_3xtf32_fast_accurate_tensorop_complex_gemm.cu) (complex)
|
| 145 |
+
* [Implicit GEMM Convolution SDK example](/examples/28_ampere_3xtf32_fast_accurate_tensorop_fprop/ampere_3xtf32_fast_accurate_tensorop_fprop.cu)
|
| 146 |
+
* **Mainloop fusion for Convolution:** convolution with fused per-channel scale-bias-relu
|
| 147 |
+
* [Conv Fprop SDK example](/examples/25_ampere_fprop_mainloop_fusion/ampere_fprop_mainloop_fusion.cu)
|
| 148 |
+
* [Conv WGrad SDK example](/examples/26_ampere_wgrad_mainloop_fusion/ampere_wgrad_mainloop_fusion.cu)
|
| 149 |
+
* [cutlass::conv::device::ImplicitGemmConvolutionFusion](/include/cutlass/conv/device/implicit_gemm_convolution_fusion.h)
|
| 150 |
+
* **Grouped GEMM:** similar to batched GEMM with distinct problem size per group
|
| 151 |
+
* [SDK example](/examples/24_gemm_grouped) with performance comparison with Batched Strided GEMM
|
| 152 |
+
* [cutlass::gemm::device::GemmGrouped](/include/cutlass/gemm/device/gemm_grouped.h)
|
| 153 |
+
* [Implicit GEMM Convolution fusion](/examples/13_two_tensor_op_fusion/) supports staging 1st convolution's output accumulator in the shared memory on Turing. This allows more flexible warp tile sizes and less regsiter pressue.
|
| 154 |
+
* Optimal performance using [**CUDA 11.5**](https://developer.nvidia.com/cuda-downloads)
|
| 155 |
+
* Updates from the community (thanks!)
|
| 156 |
+
|
| 157 |
+
* **Deprecation announcement:** CUTLASS plans to deprecate the following:
|
| 158 |
+
* Maxwell and Pascal GPU architectures
|
| 159 |
+
* Ubuntu 16.04
|
| 160 |
+
* CUDA 10.2
|
| 161 |
+
|
| 162 |
+
## [2.7.0](https://github.com/NVIDIA/cutlass/releases/tag/v2.7.0) (2021-09-24)
|
| 163 |
+
* Mainloop fusion for GEMM: [summation over A or B](/examples/23_ampere_gemm_operand_reduction_fusion/ampere_gemm_operand_reduction_fusion.cu)
|
| 164 |
+
* [Strided DGRAD (optimized iterators)](/include/cutlass/conv/kernel/default_conv2d_dgrad.h)
|
| 165 |
+
* [Half-precision GELU_taylor activation functions](/include/cutlass/epilogue/thread/activation.h#L196)
|
| 166 |
+
* Use these when accumulation and epilogue compute types are all `cutlass::half_t`
|
| 167 |
+
* Tuning and bug fixes to [fused GEMM + GEMM example](/examples/13_two_tensor_op_fusion/)
|
| 168 |
+
* Support for smaller than 128b aligned Convolutions: [see examples](test/unit/conv/device/conv2d_fprop_implicit_gemm_f16nhwc_f16nhwc_f16nhwc_tensor_op_f16_sm80.cu#L272)
|
| 169 |
+
* Caching of results to accelerate Convolution [unit tests](test/unit/conv/device/cache_testbed_output.h)
|
| 170 |
+
* Can be enabled or disabled by running `cmake .. -DCUTLASS_TEST_ENABLE_CACHED_RESULTS=OFF`
|
| 171 |
+
* Corrections and bug fixes reported by the CUTLASS community
|
| 172 |
+
* Thank you for filing these issues!
|
| 173 |
+
|
| 174 |
+
## [2.6.1](https://github.com/NVIDIA/cutlass/releases/tag/v2.6.1) (2021-09-03)
|
| 175 |
+
* Arbitrary padding and striding for CUTLASS Strided DGRAD Convolution operator (Analytic Iterators)
|
| 176 |
+
* Tuning for GEMMs fused with partial reductions
|
| 177 |
+
* Corrections and bug fixes reported by the CUTLASS community
|
| 178 |
+
* Thank you for filing these issues!
|
| 179 |
+
|
| 180 |
+
## [2.6.0](https://github.com/NVIDIA/cutlass/releases/tag/v2.6.0) (2021-07-22)
|
| 181 |
+
* Optimal performance when compiled with the [CUDA 11.4 Toolkit](https://developer.nvidia.com/cuda-toolkit)
|
| 182 |
+
* Adopt the new L2 prefetch feature in [cp.async](/include/cutlass/arch/memory.h) and [global load](/include/cutlass/arch/memory_sm80.h)
|
| 183 |
+
* Fused operators with GEMM and Convolution
|
| 184 |
+
* [Fused broadcast in epilogue](test/unit/gemm/device/gemm_with_broadcast_f16n_f16n_f16n_tensorop_f32_sm75.cu)
|
| 185 |
+
* [Fused partial reduction in epilogue](/test/unit/gemm/device/gemm_with_reduction_f16n_f16n_f16n_tensorop_f32_sm75.cu)
|
| 186 |
+
* 64b tensor strides and leading dimensions support for GEMMs
|
| 187 |
+
* Affine rank=2 matrix layouts
|
| 188 |
+
* Row stride and column stride for matrices using [cutlass::layout::AffineRank2](/include/cutlass/layout/matrix.h)
|
| 189 |
+
* Support [FP64 tensor core](/examples/18_ampere_fp64_tensorop_affine2_gemm/ampere_fp64_tensorop_affine2_gemm.cu) and SIMT GEMM.
|
| 190 |
+
* [Batched GEMV](/test/unit/gemm/device/gemv.cu) preview implementation
|
| 191 |
+
* [New strided Dgrad](test/unit/conv/device/conv2d_strided_dgrad_implicit_gemm_f16nhwc_f16nhwc_f32nhwc_tensor_op_f32_sm80.cu) implementation
|
| 192 |
+
* Accelerates over previous implementation by cutting down redundant math by 4x
|
| 193 |
+
* Support using new `Dy` and `w` analytic iterators and existing `cutlass::conv::device::ImplicitGemmConvolution` interface
|
| 194 |
+
* Quaternion-valued GEMM and Convolution in single- and double-precision (targeting CUDA Cores)
|
| 195 |
+
* Updates to [quaternion.h](/include/cutlass/quaternion.h) and [functional.h](/include/cutlass/functional.h)
|
| 196 |
+
* SDK Example for [GEMM](/examples/21_quaternion_gemm/quaternion_gemm.cu) and [Convolution](/examples/22_quaternion_gemm/quaternion_conv.cu)
|
| 197 |
+
* [Unit tests for GEMM](/test/unit/gemm/device/simt_qgemm_nn_sm50.cu) and [Convolution](/test/unit/conv/device/conv2d_fprop_implicit_gemm_qf32nhwc_qf32nhwc_qf32nhwc_simt_f32_sm50.cu)
|
| 198 |
+
* Many improvements to the epilogue.
|
| 199 |
+
* Provide an [option](/include/cutlass/epilogue/threadblock/epilogue.h) to not fully unroll the epilogue to reduce the code size and improve the performance when using complicated elementwise operations
|
| 200 |
+
* Performance improvement for FP16 tensor core kernels
|
| 201 |
+
* Bug fixes
|
| 202 |
+
* Enhanced Clang support and the combination of Clang 13 and CUDA 11.4 can build and run kernels from Pascal and Ampere.
|
| 203 |
+
* Updated minimum CUDA Toolkit requirement to 10.2
|
| 204 |
+
* [CUDA 11.4 Toolkit](https://developer.nvidia.com/cuda-toolkit) recommended
|
| 205 |
+
* Corrections and bug fixes reported by the CUTLASS community
|
| 206 |
+
* Thank you for filing these issues!
|
| 207 |
+
|
| 208 |
+
## [2.5.0](https://github.com/NVIDIA/cutlass/releases/tag/v2.5.0) (2021-02-26)
|
| 209 |
+
* Tensor reductions
|
| 210 |
+
* _m_-to-_n_ reductions of tensors with affine layout
|
| 211 |
+
* [Specializations](/test/unit/reduction/device/tensor_reduce_contiguous.cu) for reductions including contiguous dimension
|
| 212 |
+
* [Specializations](/test/unit/reduction/device/tensor_reduce_strided.cu) for reductions excluding contiguous dimension
|
| 213 |
+
* Custom reduction functors such as `cutlass::logical_and`
|
| 214 |
+
* Large tensor support, up to 2^63 elements (however, each dimension is limited to an extent of 2^31)
|
| 215 |
+
* Optimizations for 3-D convolution
|
| 216 |
+
* [Optimized tile iterators](include/cutlass/conv/threadblock/conv3d_fprop_activation_tile_access_iterator_optimized.h) using precomputed delta table for 3-D convolution
|
| 217 |
+
* Full coverage of [forward](test/unit/conv/device/conv3d_fprop_implicit_gemm_f16ndhwc_f16ndhwc_f32ndhwc_tensor_op_f32_sm80.cu) and [backwards](test/unit/conv/device/conv3d_dgrad_implicit_gemm_f16ndhwc_f16ndhwc_f32ndhwc_tensor_op_f32_sm80.cu) passes for 3D convolution
|
| 218 |
+
* [Fused Convolution+Convolution example](/examples/13_two_tensor_op_fusion/README.md)
|
| 219 |
+
* Corrections and bug fixes reported by the CUTLASS community
|
| 220 |
+
* Thank you for filing these issues!
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
## [2.4.0](https://github.com/NVIDIA/cutlass/releases/tag/v2.4.0) (2020-11-19)
|
| 224 |
+
* Implicit GEMM convolution kernels supporting CUDA and Tensor Cores on NVIDIA GPUs
|
| 225 |
+
* Operators: forward (Fprop), backward data gradient (Dgrad), and backward weight gradient (Wgrad) convolution
|
| 226 |
+
* Data type: FP32, complex<FP32>, Tensor Float 32 (TF32), BFloat16 (BF16), Float16, Int4, Int8, Int32
|
| 227 |
+
* Spatial dimensions: 1-D, 2-D, and 3-D
|
| 228 |
+
* Layout: NHWC, NCxHWx
|
| 229 |
+
* Implicit GEMM convolution components:
|
| 230 |
+
* Global memory iterators supporting Fprop, Dgrad, and Wgrad
|
| 231 |
+
* `MmaMultistage` for implicit GEMM convolution for NVIDIA Ampere architecture
|
| 232 |
+
* `MmaPipeline` for implicit GEMM convolution for NVIDIA Volta and Turing architectures
|
| 233 |
+
* [Documentation](/media/docs/implicit_gemm_convolution.md) describing Implicit GEMM Convolution algorithm and implementation
|
| 234 |
+
|
| 235 |
+
## [2.3.0](https://github.com/NVIDIA/cutlass/releases/tag/v2.3.0) (2020-09-23)
|
| 236 |
+
* [NVIDIA Ampere Architecture features](https://devblogs.nvidia.com/nvidia-ampere-architecture-in-depth/)
|
| 237 |
+
* [Sparse Tensor Core GEMM kernels](test/unit/gemm/device/gemm_f16n_f16n_f32t_tensor_op_f32_sparse_sm80.cu):
|
| 238 |
+
* Direct access to Sparse Tensor Cores and maximum performance via [`mma.sp.sync`](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-instructions-mma-and-friends)
|
| 239 |
+
* Fast SGEMM targeting GeForce RTX 30-series CUDA Cores
|
| 240 |
+
* Minor Features:
|
| 241 |
+
* [Activation functions](/include/cutlass/epilogue/thread/activation.h) such as [GeLU](/include/cutlass/epilogue/thread/linear_combination_gelu.h) and [Sigmoid](/include/cutlass/epilogue/thread/linear_combination_sigmoid.h)
|
| 242 |
+
* Small [matrix](/include/cutlass/matrix.h) and [quaternion](/include/cutlass/quaternion.h) template classes in device code
|
| 243 |
+
* [Floating-point constants](/include/cutlass/constants.h)
|
| 244 |
+
* NVIDIA Ampere GPU Architecture examples and documentation:
|
| 245 |
+
* [Tensor Float 32](/examples/14_ampere_tf32_tensorop_gemm/ampere_tf32_tensorop_gemm.cu) and
|
| 246 |
+
* [Sparse Tensor Cores](/examples/15_ampere_sparse_tensorop_gemm/ampere_sparse_tensorop_gemm.cu)
|
| 247 |
+
* Documentation added on CUTLASS [efficient row-major epilogue](/media/docs/gemm_api.md#efficient-epilogue)
|
| 248 |
+
|
| 249 |
+
## [2.2.0](https://github.com/NVIDIA/cutlass/releases/tag/v2.2.0) (2020-06-08)
|
| 250 |
+
* [NVIDIA Ampere Architecture features](https://devblogs.nvidia.com/nvidia-ampere-architecture-in-depth/)
|
| 251 |
+
* Fast Tensor Core operations:
|
| 252 |
+
* Maximum performance via [`mma.sync`](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-instructions-mma-and-friends)
|
| 253 |
+
* Tensor Float 32, BFloat16, and double-precision data types
|
| 254 |
+
* Mixed integer data types (int8, int4, bin1)
|
| 255 |
+
* Asynchronous copy for deep software pipelines via [`cp.async`](https://docs.nvidia.com/cuda/parallel-thread-execution)
|
| 256 |
+
* Described in [GTC 2020 Webinar (SR 21745)](https://developer.nvidia.com/gtc/2020/video/s21745) (free registration required)
|
| 257 |
+
* Features:
|
| 258 |
+
* SDK examples showing GEMM fused with bias+relu and fused GEMM+GEMM
|
| 259 |
+
* Complex-valued GEMMs targeting NVIDIA Ampere Tensor Cores in double-precision and Tensor Float 32
|
| 260 |
+
* Gaussian complex GEMMs using 3m complex multiply algorithm
|
| 261 |
+
* Universal GEMM kernel supporting two batch modes and two algorithms for parallel reductions
|
| 262 |
+
* Policy updates:
|
| 263 |
+
* [CUDA 11 Toolkit](https://developer.nvidia.com/cuda-toolkit) needed to enable NVIDIA Ampere Architecture features
|
| 264 |
+
* Disabled F16C by default for compatibility - enable on cmake command line with `-DCUTLASS_ENABLE_F16C=ON`
|
| 265 |
+
|
| 266 |
+
## [2.1.0](https://github.com/NVIDIA/cutlass/releases/tag/v2.1.0) (2020-04-06)
|
| 267 |
+
* BLAS-style host-side API added to [CUTLASS Library](/media/docs/quickstart.md#cutlass-library)
|
| 268 |
+
* API to launch compiled kernel instances for GEMM and planar complex GEMM
|
| 269 |
+
* Planar Complex GEMM kernels targeting Volta and Turing Tensor Cores
|
| 270 |
+
* Computes complex matrix products on matrices stored as disjoint real and imaginary parts
|
| 271 |
+
* [SDK Examples of Planar Complex GEMMs](/examples/10_planar_complex/planar_complex.cu)
|
| 272 |
+
* Minor enhancements and bug fixes
|
| 273 |
+
|
| 274 |
+
## [2.0.0](https://github.com/NVIDIA/cutlass/releases/tag/v2.0.0) (2019-11-19)
|
| 275 |
+
* Substantially refactored for
|
| 276 |
+
* Better performance, particularly for native Turing Tensor Cores
|
| 277 |
+
* Robust and durable templates spanning the design space
|
| 278 |
+
* Encapsulated functionality embodying modern C++11 programming techniques
|
| 279 |
+
* Optimized containers and data types for efficient, generic, portable device code
|
| 280 |
+
* Updates to:
|
| 281 |
+
* [Quick start guide](/media/docs/quickstart.md)
|
| 282 |
+
* [Documentation](/README.md#documentation)
|
| 283 |
+
* [Utilities](/media/docs/utilities.md)
|
| 284 |
+
* [CUTLASS Profiler](/media/docs/profiler.md)
|
| 285 |
+
* Native Turing Tensor Cores
|
| 286 |
+
* Efficient GEMM kernels targeting Turing Tensor Cores
|
| 287 |
+
* Mixed-precision floating point, 8-bit integer, 4-bit integer, and binarized operands
|
| 288 |
+
* Coverage of existing CUTLASS functionality
|
| 289 |
+
* GEMM kernels targeting CUDA and Tensor Cores in NVIDIA GPUs
|
| 290 |
+
* Volta Tensor Cores through native mma.sync and through WMMA API
|
| 291 |
+
* Optimizations such as parallel reductions, threadblock rasterization, and intra-threadblock reductions
|
| 292 |
+
* Batched GEMM operations
|
| 293 |
+
* Complex-valued GEMMs
|
| 294 |
+
* **Note: a host compiler supporting C++11 or greater is required.**
|
| 295 |
+
|
| 296 |
+
# CUTLASS 1.x
|
| 297 |
+
|
| 298 |
+
## [1.3.2](https://github.com/NVIDIA/cutlass/releases/tag/v1.3.2) (2019-07-09)
|
| 299 |
+
* Performance improvement for Volta Tensor Cores TN and TT layouts.
|
| 300 |
+
|
| 301 |
+
## [1.3.1](https://github.com/NVIDIA/cutlass/releases/tag/v1.3.1) (2019-04-09)
|
| 302 |
+
* Corrected NVRTC unit tests.
|
| 303 |
+
|
| 304 |
+
## [1.3.0](https://github.com/NVIDIA/cutlass/releases/tag/v1.3.0) (2019-03-20)
|
| 305 |
+
* Efficient GEMM kernel targeting Volta Tensor Cores via `mma.sync` instruction added in CUDA 10.1.
|
| 306 |
+
|
| 307 |
+
## [1.2.0](https://github.com/NVIDIA/cutlass/releases/tag/v1.2.0) (2018-10-26)
|
| 308 |
+
* Parallelized reductions across threadblocks ("Split-K")
|
| 309 |
+
* Improved IGEMM performance
|
| 310 |
+
* Batched strided WMMA GEMMs
|
| 311 |
+
|
| 312 |
+
## [1.1.0](https://github.com/NVIDIA/cutlass/releases/tag/v1.1.0) (2018-09-19)
|
| 313 |
+
* Turing Features
|
| 314 |
+
* WMMA GEMM targeting TensorCores - INT8, INT4, 1-bit
|
| 315 |
+
* Batched Strided GEMM
|
| 316 |
+
* Threadblock rasterization strategies
|
| 317 |
+
* Improved performance for adverse problem sizes and data layouts
|
| 318 |
+
* Extended CUTLASS Core comonents
|
| 319 |
+
* Tensor views support arbitrary matrix and tensor layouts
|
| 320 |
+
* Zip iterators for structuring multiple data streams
|
| 321 |
+
* Enhanced CUTLASS utilities
|
| 322 |
+
* Reference code for tensor operations in host and device code
|
| 323 |
+
* Added HostMatrix<> for simplified matrix creation
|
| 324 |
+
* Examples
|
| 325 |
+
* Basic GEMM, tensor views, CUTLASS utilities, batched GEMM, WMMA GEMM
|
| 326 |
+
|
| 327 |
+
## [1.0.1](https://github.com/NVIDIA/cutlass/releases/tag/v1.0.1) (2018-06-11)
|
| 328 |
+
|
| 329 |
+
* Intra-threadblock reduction added for small threadblock tile sizes
|
| 330 |
+
* sgemm_64x128x16, sgemm_128x128x16, sgemm_128x64x16, sgemm_128x32x16, sgemm_64x64x16, sgemm_64x32x16
|
| 331 |
+
* igemm_32x32x128
|
| 332 |
+
* GEMM _K_ residue handled during prologue prior to mainloop
|
| 333 |
+
* Replaced Google Test copy with submodule. Use `git submodule init --recursive --update`
|
| 334 |
+
|
| 335 |
+
## [1.0.0](https://github.com/NVIDIA/cutlass/commit/2028ebe120aab22bfd0b2baf8902d4c9627eb33f) (2018-05-16)
|
| 336 |
+
|
| 337 |
+
* Substantial rewrite to accommodate new architecture
|
| 338 |
+
* Kernels: SGEMM, DGEMM, IGEMM, HGEMM, WMMA GEMM
|
| 339 |
+
* Unit and performance tests
|
| 340 |
+
|
| 341 |
+
## [0.0.1](https://github.com/NVIDIA/cutlass/commit/d08ba8ac46e2fa3f745e070c390182edb56b2e91) (2017-12-04)
|
| 342 |
+
|
| 343 |
+
* Initial release
|
| 344 |
+
|
| 345 |
+
|
| 346 |
+
## Copyright
|
| 347 |
+
|
| 348 |
+
Copyright (c) 2017 - 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 349 |
+
SPDX-License-Identifier: BSD-3-Clause
|
| 350 |
+
|
| 351 |
+
```
|
| 352 |
+
Redistribution and use in source and binary forms, with or without
|
| 353 |
+
modification, are permitted provided that the following conditions are met:
|
| 354 |
+
|
| 355 |
+
1. Redistributions of source code must retain the above copyright notice, this
|
| 356 |
+
list of conditions and the following disclaimer.
|
| 357 |
+
|
| 358 |
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
| 359 |
+
this list of conditions and the following disclaimer in the documentation
|
| 360 |
+
and/or other materials provided with the distribution.
|
| 361 |
+
|
| 362 |
+
3. Neither the name of the copyright holder nor the names of its
|
| 363 |
+
contributors may be used to endorse or promote products derived from
|
| 364 |
+
this software without specific prior written permission.
|
| 365 |
+
|
| 366 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 367 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 368 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 369 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 370 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 371 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 372 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 373 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 374 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 375 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 376 |
+
```
|
| 377 |
+
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/CITATION.cff
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cff-version: 1.2.0
|
| 2 |
+
title: CUTLASS
|
| 3 |
+
message: >-
|
| 4 |
+
If you use this software, please cite using the
|
| 5 |
+
following metadata.
|
| 6 |
+
type: software
|
| 7 |
+
authors:
|
| 8 |
+
- given-names: Vijay
|
| 9 |
+
family-names: Thakkar
|
| 10 |
+
email: vithakkar@nvidia.com
|
| 11 |
+
affiliation: NVIDIA
|
| 12 |
+
- given-names: Pradeep
|
| 13 |
+
family-names: Ramani
|
| 14 |
+
email: prramani@nvidia.com
|
| 15 |
+
affiliation: NVIDIA
|
| 16 |
+
- given-names: Cris
|
| 17 |
+
family-names: Cecka
|
| 18 |
+
email: ccecka@nvidia.com
|
| 19 |
+
affiliation: NVIDIA
|
| 20 |
+
- given-names: Aniket
|
| 21 |
+
family-names: Shivam
|
| 22 |
+
email: ashivam@nvidia.com
|
| 23 |
+
affiliation: NVIDIA
|
| 24 |
+
- given-names: Honghao
|
| 25 |
+
family-names: Lu
|
| 26 |
+
email: honghaol@nvidia.com
|
| 27 |
+
affiliation: NVIDIA
|
| 28 |
+
- given-names: Ethan
|
| 29 |
+
family-names: Yan
|
| 30 |
+
email: etyan@nvidia.com
|
| 31 |
+
affiliation: NVIDIA
|
| 32 |
+
- given-names: Jack
|
| 33 |
+
family-names: Kosaian
|
| 34 |
+
email: jkosaian@nvidia.com
|
| 35 |
+
affiliation: NVIDIA
|
| 36 |
+
- given-names: Mark
|
| 37 |
+
family-names: Hoemmen
|
| 38 |
+
email: mhoemmen@nvidia.com
|
| 39 |
+
affiliation: NVIDIA
|
| 40 |
+
- given-names: Haicheng
|
| 41 |
+
family-names: Wu
|
| 42 |
+
email: haichengw@nvidia.com
|
| 43 |
+
affiliation: NVIDIA
|
| 44 |
+
- given-names: Andrew
|
| 45 |
+
family-names: Kerr
|
| 46 |
+
email: akerr@nvidia.com
|
| 47 |
+
affiliation: NVIDIA
|
| 48 |
+
- given-names: Matt
|
| 49 |
+
family-names: Nicely
|
| 50 |
+
email: mnicely@nvidia.com
|
| 51 |
+
affiliation: NVIDIA
|
| 52 |
+
- given-names: Duane
|
| 53 |
+
family-names: Merrill
|
| 54 |
+
email: dumerrill@nvidia.com
|
| 55 |
+
affiliation: NVIDIA
|
| 56 |
+
- given-names: Dustyn
|
| 57 |
+
family-names: Blasig
|
| 58 |
+
email: dblasig@nvidia.com
|
| 59 |
+
affiliation: NVIDIA
|
| 60 |
+
- given-names: Fengqi
|
| 61 |
+
family-names: Qiao
|
| 62 |
+
email: fqiao@nvidia.com
|
| 63 |
+
affiliation: NVIDIA
|
| 64 |
+
- given-names: Piotr
|
| 65 |
+
family-names: Majcher
|
| 66 |
+
email: pmajcher@nvidia.com
|
| 67 |
+
affiliation: NVIDIA
|
| 68 |
+
- given-names: Paul
|
| 69 |
+
family-names: Springer
|
| 70 |
+
email: pspringer@nvidia.com
|
| 71 |
+
affiliation: NVIDIA
|
| 72 |
+
- given-names: Markus
|
| 73 |
+
family-names: Hohnerbach
|
| 74 |
+
affiliation: NVIDIA
|
| 75 |
+
email: mhohnerbach@nvidia.com
|
| 76 |
+
- given-names: Jin
|
| 77 |
+
family-names: Wang
|
| 78 |
+
email: jinw@nvidia.com
|
| 79 |
+
affiliation: NVIDIA
|
| 80 |
+
- given-names: Manish
|
| 81 |
+
family-names: Gupta
|
| 82 |
+
affiliation: Google
|
| 83 |
+
email: manigupta@google.com
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
repository-code: 'https://github.com/NVIDIA/cutlass'
|
| 87 |
+
abstract: >-
|
| 88 |
+
CUTLASS is a collection of CUDA C++ template
|
| 89 |
+
abstractions for implementing high-performance
|
| 90 |
+
matrix-multiplication (GEMM) and related
|
| 91 |
+
computations at all levels and scales within CUDA.
|
| 92 |
+
It incorporates strategies for hierarchical
|
| 93 |
+
decomposition and data movement similar to those
|
| 94 |
+
used to implement cuBLAS and cuDNN. CUTLASS
|
| 95 |
+
decomposes these "moving parts" into reusable,
|
| 96 |
+
modular software components abstracted by C++
|
| 97 |
+
template classes. These thread-wide, warp-wide,
|
| 98 |
+
block-wide, and device-wide primitives can be
|
| 99 |
+
specialized and tuned via custom tiling sizes, data
|
| 100 |
+
types, and other algorithmic policy. The resulting
|
| 101 |
+
flexibility simplifies their use as building blocks
|
| 102 |
+
within custom kernels and applications.
|
| 103 |
+
keywords:
|
| 104 |
+
- 'cutlass, tensor cores, cuda, cute, nvidia, gpu, linear algebra, matrix computations'
|
| 105 |
+
license: BSD-3-Clause
|
| 106 |
+
license-url: https://github.com/NVIDIA/cutlass/blob/v3.0.0/LICENSE.txt
|
| 107 |
+
version: '3.0.0'
|
| 108 |
+
date-released: '2023-01-23'
|
| 109 |
+
identifiers:
|
| 110 |
+
- type: url
|
| 111 |
+
value: "https://github.com/NVIDIA/cutlass/tree/v3.0.0"
|
| 112 |
+
description: The GitHub release URL of tag 3.0.0
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/CMakeLists.txt
ADDED
|
@@ -0,0 +1,923 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2017 - 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
#
|
| 4 |
+
# Redistribution and use in source and binary forms, with or without
|
| 5 |
+
# modification, are permitted provided that the following conditions are met:
|
| 6 |
+
#
|
| 7 |
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
| 8 |
+
# list of conditions and the following disclaimer.
|
| 9 |
+
#
|
| 10 |
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
| 11 |
+
# this list of conditions and the following disclaimer in the documentation
|
| 12 |
+
# and/or other materials provided with the distribution.
|
| 13 |
+
#
|
| 14 |
+
# 3. Neither the name of the copyright holder nor the names of its
|
| 15 |
+
# contributors may be used to endorse or promote products derived from
|
| 16 |
+
# this software without specific prior written permission.
|
| 17 |
+
#
|
| 18 |
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 19 |
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 20 |
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 21 |
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 22 |
+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 23 |
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 24 |
+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 25 |
+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 26 |
+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 27 |
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 28 |
+
|
| 29 |
+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
|
| 30 |
+
cmake_policy(SET CMP0112 NEW)
|
| 31 |
+
|
| 32 |
+
if(cutlass_LOADED)
|
| 33 |
+
# If CUTLASS has been previously fetched and loaded, don't do it again.
|
| 34 |
+
return()
|
| 35 |
+
else()
|
| 36 |
+
set(cutlass_LOADED ON)
|
| 37 |
+
set(CUTLASS_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "CUTLASS Repository Directory")
|
| 38 |
+
endif()
|
| 39 |
+
|
| 40 |
+
message(STATUS "CMake Version: ${CMAKE_VERSION}")
|
| 41 |
+
set(IMPLICIT_CMAKE_CXX_STANDARD OFF CACHE BOOL "Do not explicitly specify -std=c++11 if set")
|
| 42 |
+
|
| 43 |
+
project(CUTLASS VERSION 3.2.2 LANGUAGES CXX)
|
| 44 |
+
include(${CMAKE_CURRENT_SOURCE_DIR}/CUDA.cmake)
|
| 45 |
+
|
| 46 |
+
if (CUDA_VERSION VERSION_LESS 11.3)
|
| 47 |
+
message(WARNING "CUTLASS ${CUTLASS_VERSION} requires CUDA 11.4 or higher, and strongly recommends CUDA 11.8 or higher.")
|
| 48 |
+
elseif (CUDA_VERSION VERSION_LESS 11.4)
|
| 49 |
+
message(WARNING "CUTLASS ${CUTLASS_VERSION} support for CUDA ${CUDA_VERSION} is deprecated, please use CUDA 11.8 or higher.")
|
| 50 |
+
endif()
|
| 51 |
+
|
| 52 |
+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.5)
|
| 53 |
+
message(FATAL_ERROR "GCC version must be at least 7.5!")
|
| 54 |
+
endif()
|
| 55 |
+
|
| 56 |
+
if (CUDA_COMPILER MATCHES "[Cc]lang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
|
| 57 |
+
message(FATAL_ERROR "Clang 7.0+ required for GPU compilation")
|
| 58 |
+
endif()
|
| 59 |
+
|
| 60 |
+
find_package(Doxygen QUIET)
|
| 61 |
+
|
| 62 |
+
################################################################################
|
| 63 |
+
|
| 64 |
+
#
|
| 65 |
+
# CUTLASS 3.x requires C++17
|
| 66 |
+
#
|
| 67 |
+
set(CMAKE_CXX_STANDARD 17)
|
| 68 |
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
| 69 |
+
set(CMAKE_CXX_EXTENSIONS OFF)
|
| 70 |
+
|
| 71 |
+
if(CUTLASS_NATIVE_CUDA)
|
| 72 |
+
set(CMAKE_CUDA_STANDARD 17)
|
| 73 |
+
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
|
| 74 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS --expt-relaxed-constexpr)
|
| 75 |
+
else()
|
| 76 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS --std=c++17)
|
| 77 |
+
endif()
|
| 78 |
+
|
| 79 |
+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
| 80 |
+
set(CMAKE_INSTALL_PREFIX install CACHE PATH "Default installation location." FORCE)
|
| 81 |
+
endif()
|
| 82 |
+
|
| 83 |
+
message(STATUS "Default Install Location: ${CMAKE_INSTALL_PREFIX}")
|
| 84 |
+
|
| 85 |
+
set(CUTLASS_TEST_LEVEL "0" CACHE STRING "Level of tests to compile.")
|
| 86 |
+
# 0 - Sanity, 1 - Release-Quality, 2 - Exhaustive
|
| 87 |
+
|
| 88 |
+
find_package(Python3 3.5 COMPONENTS Interpreter REQUIRED)
|
| 89 |
+
|
| 90 |
+
# Install cutlass_library Python package
|
| 91 |
+
execute_process(
|
| 92 |
+
WORKING_DIRECTORY ${CUTLASS_DIR}/python
|
| 93 |
+
COMMAND ${Python3_EXECUTABLE} ${CUTLASS_DIR}/python/setup_library.py develop --user
|
| 94 |
+
RESULT_VARIABLE cutlass_lib_GENERATOR_INSTALL_RESULT
|
| 95 |
+
OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/cutlass_library_installation.log
|
| 96 |
+
ERROR_FILE ${CMAKE_CURRENT_BINARY_DIR}/cutlass_library_installation.log
|
| 97 |
+
)
|
| 98 |
+
|
| 99 |
+
if(NOT cutlass_lib_GENERATOR_INSTALL_RESULT EQUAL 0)
|
| 100 |
+
message(FATAL_ERROR "Error installing cutlass_library package. See ${CMAKE_CURRENT_BINARY_DIR}/cutlass_library_installation.log")
|
| 101 |
+
endif()
|
| 102 |
+
|
| 103 |
+
################################################################################
|
| 104 |
+
set(CUTLASS_ENABLE_HEADERS_ONLY OFF CACHE BOOL "Enable only the header library")
|
| 105 |
+
|
| 106 |
+
if(CUTLASS_ENABLE_HEADERS_ONLY)
|
| 107 |
+
set(CUTLASS_ENABLE_EXAMPLES_INIT OFF)
|
| 108 |
+
set(CUTLASS_ENABLE_TOOLS_INIT ON)
|
| 109 |
+
set(CUTLASS_ENABLE_LIBRARY_INIT OFF)
|
| 110 |
+
set(CUTLASS_ENABLE_TESTS_INIT OFF)
|
| 111 |
+
else()
|
| 112 |
+
set(CUTLASS_ENABLE_EXAMPLES_INIT ON)
|
| 113 |
+
set(CUTLASS_ENABLE_TOOLS_INIT ON)
|
| 114 |
+
set(CUTLASS_ENABLE_LIBRARY_INIT ON)
|
| 115 |
+
if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
|
| 116 |
+
set(CUTLASS_ENABLE_TESTS_INIT ON)
|
| 117 |
+
else()
|
| 118 |
+
set(CUTLASS_ENABLE_TESTS_INIT OFF)
|
| 119 |
+
endif()
|
| 120 |
+
endif()
|
| 121 |
+
|
| 122 |
+
set(CUTLASS_TEST_UNIT_ENABLE_WARNINGS OFF CACHE BOOL "Enable warnings on waived unit tests.")
|
| 123 |
+
|
| 124 |
+
set(CUTLASS_ENABLE_EXAMPLES ${CUTLASS_ENABLE_EXAMPLES_INIT} CACHE BOOL "Enable CUTLASS Examples")
|
| 125 |
+
set(CUTLASS_ENABLE_TOOLS ${CUTLASS_ENABLE_TOOLS_INIT} CACHE BOOL "Enable CUTLASS Tools")
|
| 126 |
+
set(CUTLASS_ENABLE_LIBRARY ${CUTLASS_ENABLE_LIBRARY_INIT} CACHE BOOL "Enable CUTLASS Library")
|
| 127 |
+
set(CUTLASS_ENABLE_PROFILER ${CUTLASS_ENABLE_LIBRARY} CACHE BOOL "Enable CUTLASS Profiler")
|
| 128 |
+
set(CUTLASS_ENABLE_PERFORMANCE ${CUTLASS_ENABLE_PROFILER} CACHE BOOL "Enable CUTLASS Performance")
|
| 129 |
+
|
| 130 |
+
set(CUTLASS_ENABLE_TESTS ${CUTLASS_ENABLE_TESTS_INIT} CACHE BOOL "Enable CUTLASS Tests")
|
| 131 |
+
set(CUTLASS_ENABLE_GTEST_UNIT_TESTS ${CUTLASS_ENABLE_TESTS} CACHE BOOL "Enable CUTLASS GTest-based Unit Tests")
|
| 132 |
+
################################################################################
|
| 133 |
+
|
| 134 |
+
set(CUTLASS_NVCC_ARCHS_SUPPORTED "")
|
| 135 |
+
if (CUDA_VERSION VERSION_GREATER_EQUAL 11.4 AND NOT CUDA_COMPILER MATCHES "[Cc]lang")
|
| 136 |
+
list(APPEND CUTLASS_NVCC_ARCHS_SUPPORTED 70 72 75 80 86 87)
|
| 137 |
+
endif()
|
| 138 |
+
if (CUDA_VERSION VERSION_GREATER_EQUAL 11.8 AND NOT CUDA_COMPILER MATCHES "[Cc]lang")
|
| 139 |
+
list(APPEND CUTLASS_NVCC_ARCHS_SUPPORTED 89 90)
|
| 140 |
+
endif()
|
| 141 |
+
if (CUDA_VERSION VERSION_GREATER_EQUAL 12.0 AND NOT CUDA_COMPILER MATCHES "[Cc]lang")
|
| 142 |
+
list(APPEND CUTLASS_NVCC_ARCHS_SUPPORTED 90a)
|
| 143 |
+
endif()
|
| 144 |
+
set(CUTLASS_NVCC_ARCHS ${CUTLASS_NVCC_ARCHS_SUPPORTED} CACHE STRING "The SM architectures requested.")
|
| 145 |
+
set(CUTLASS_NVCC_ARCHS_ENABLED ${CUTLASS_NVCC_ARCHS} CACHE STRING "The SM architectures to build code for.")
|
| 146 |
+
|
| 147 |
+
# Find unsupported and deprecated compute capabilities
|
| 148 |
+
if (CUTLASS_NVCC_ARCHS_SUPPORTED)
|
| 149 |
+
set(CUTLASS_NVCC_ARCHS_UNSUPPORTED ${CUTLASS_NVCC_ARCHS})
|
| 150 |
+
list(REMOVE_ITEM CUTLASS_NVCC_ARCHS_UNSUPPORTED ${CUTLASS_NVCC_ARCHS_SUPPORTED})
|
| 151 |
+
if (CUTLASS_NVCC_ARCHS_UNSUPPORTED)
|
| 152 |
+
message(WARNING "Using unsupported or deprecated compute capabilities ${CUTLASS_NVCC_ARCHS_UNSUPPORTED}. Support may be removed in future versions.")
|
| 153 |
+
endif()
|
| 154 |
+
else()
|
| 155 |
+
message(WARNING "No supported compute capabilities for CUDA ${CUDA_VERSION}.")
|
| 156 |
+
endif()
|
| 157 |
+
|
| 158 |
+
# Special policy introduced in CMake 3.13
|
| 159 |
+
if (POLICY CMP0076)
|
| 160 |
+
cmake_policy(SET CMP0076 NEW)
|
| 161 |
+
endif()
|
| 162 |
+
|
| 163 |
+
include(GNUInstallDirs)
|
| 164 |
+
|
| 165 |
+
link_directories(${CUDA_TOOLKIT_ROOT_DIR}/lib64/stubs)
|
| 166 |
+
|
| 167 |
+
###################################################################################################
|
| 168 |
+
#
|
| 169 |
+
# Configure CMake variables
|
| 170 |
+
#
|
| 171 |
+
###################################################################################################
|
| 172 |
+
|
| 173 |
+
message(STATUS "CUDA Compilation Architectures: ${CUTLASS_NVCC_ARCHS_ENABLED}")
|
| 174 |
+
|
| 175 |
+
if (NOT (CMAKE_BUILD_TYPE OR CONFIGURATION_TYPES))
|
| 176 |
+
# By default we want to build in Release mode to ensure that we're getting best performance.
|
| 177 |
+
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose build level" FORCE)
|
| 178 |
+
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "RelWithDebInfo" "Release")
|
| 179 |
+
endif()
|
| 180 |
+
|
| 181 |
+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
| 182 |
+
if (DEFINED CMAKE_DEBUG_POSTFIX)
|
| 183 |
+
set(CUTLASS_LIBRARY_DEBUG_POSTFIX_INIT ${CMAKE_DEBUG_POSTFIX})
|
| 184 |
+
else()
|
| 185 |
+
set(CUTLASS_LIBRARY_DEBUG_POSTFIX_INIT .debug)
|
| 186 |
+
endif()
|
| 187 |
+
set(CUTLASS_LIBRARY_DEBUG_POSTFIX ${CUTLASS_LIBRARY_DEBUG_POSTFIX_INIT} CACHE STRING "Default postfix value for debug libraries")
|
| 188 |
+
|
| 189 |
+
if(WIN32)
|
| 190 |
+
# On Windows we link against the shared (DLL) runtime. Change gtest settings to match this.
|
| 191 |
+
set(gtest_force_shared_crt ON CACHE BOOL "Use shared (DLL) run-time lib even when Google Test is built as static lib" FORCE)
|
| 192 |
+
endif()
|
| 193 |
+
|
| 194 |
+
if (WIN32)
|
| 195 |
+
# Enable more warnings. Add "-Xcompiler=/WX" to enable warnings as errors.
|
| 196 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -Xcompiler=/W3)
|
| 197 |
+
|
| 198 |
+
# Disable warning on Unicode characters
|
| 199 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -Xcompiler=/wd4819)
|
| 200 |
+
|
| 201 |
+
# Disable excess x86 floating point precision that can lead to results being labeled incorrectly
|
| 202 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -Xcompiler=/fp:strict)
|
| 203 |
+
endif(WIN32)
|
| 204 |
+
|
| 205 |
+
if (${CUTLASS_NVCC_VERBOSE})
|
| 206 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -v)
|
| 207 |
+
endif()
|
| 208 |
+
|
| 209 |
+
#
|
| 210 |
+
# CUTLASS NAMESPACE
|
| 211 |
+
#
|
| 212 |
+
set(CUTLASS_NAMESPACE "cutlass" CACHE STRING "Top level namespace of CUTLASS")
|
| 213 |
+
|
| 214 |
+
set(CUTLASS_NVCC_EMBED_CUBIN ON CACHE BOOL "Embed compiled CUDA kernel binaries into executables.")
|
| 215 |
+
set(CUTLASS_NVCC_EMBED_PTX ON CACHE BOOL "Embed compiled PTX into executables.")
|
| 216 |
+
set(CUTLASS_NVCC_KEEP OFF CACHE BOOL "Keep intermediate files generated by NVCC.")
|
| 217 |
+
set(CUTLASS_ENABLE_F16C OFF CACHE BOOL "Enable F16C x86 extensions in host code.")
|
| 218 |
+
|
| 219 |
+
################################################################################
|
| 220 |
+
#
|
| 221 |
+
# CUTLASS generator cmake configuration
|
| 222 |
+
#
|
| 223 |
+
|
| 224 |
+
set(CUTLASS_LIBRARY_OPERATIONS "all" CACHE STRING "Comma delimited list of operation name filters. Default '' means all operations are enabled.")
|
| 225 |
+
set(CUTLASS_LIBRARY_KERNELS ${CUTLASS_LIBRARY_KERNELS_INIT} CACHE STRING "Comma delimited list of kernel name filters. If unspecified, only the largest tile size is enabled. If 'all' is specified, all kernels are enabled.")
|
| 226 |
+
set(CUTLASS_LIBRARY_IGNORE_KERNELS "" CACHE STRING "Comma delimited list of kernel names to exclude from build.")
|
| 227 |
+
|
| 228 |
+
################################################################################
|
| 229 |
+
|
| 230 |
+
set(CUTLASS_TEST_ENABLE_CACHED_RESULTS ON CACHE BOOL "Enable caching and reuse of test results in unit tests")
|
| 231 |
+
|
| 232 |
+
set_property(CACHE CUTLASS_TEST_LEVEL PROPERTY STRINGS 0 1 2)
|
| 233 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -DCUTLASS_TEST_LEVEL=${CUTLASS_TEST_LEVEL})
|
| 234 |
+
list(APPEND CUTLASS_CUDA_CLANG_FLAGS -DCUTLASS_TEST_LEVEL=${CUTLASS_TEST_LEVEL})
|
| 235 |
+
|
| 236 |
+
if (CUTLASS_TEST_ENABLE_CACHED_RESULTS)
|
| 237 |
+
message(STATUS "Enable caching of reference results in conv unit tests")
|
| 238 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -DCUTLASS_TEST_ENABLE_CACHED_RESULTS=1)
|
| 239 |
+
endif()
|
| 240 |
+
|
| 241 |
+
set(CUTLASS_CONV_UNIT_TEST_RIGOROUS_SIZE_ENABLED ON CACHE BOOL "Enable/Disable rigorous conv problem sizes in conv unit tests")
|
| 242 |
+
|
| 243 |
+
if (CUTLASS_CONV_UNIT_TEST_RIGOROUS_SIZE_ENABLED)
|
| 244 |
+
message(STATUS "Enable rigorous conv problem sizes in conv unit tests")
|
| 245 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -DCUTLASS_CONV_UNIT_TEST_RIGOROUS_SIZE_ENABLED=1)
|
| 246 |
+
endif()
|
| 247 |
+
|
| 248 |
+
################################################################################
|
| 249 |
+
|
| 250 |
+
#
|
| 251 |
+
# CUDA 10.1 introduces "mma" in PTX performing collective matrix multiply operations.
|
| 252 |
+
#
|
| 253 |
+
|
| 254 |
+
if (CUDA_VERSION VERSION_LESS 10.1)
|
| 255 |
+
set(CUTLASS_ENABLE_TENSOR_CORE_MMA_DEFAULT OFF)
|
| 256 |
+
else()
|
| 257 |
+
set(CUTLASS_ENABLE_TENSOR_CORE_MMA_DEFAULT ON)
|
| 258 |
+
endif()
|
| 259 |
+
|
| 260 |
+
# Trace levels for debugging
|
| 261 |
+
set(CUTLASS_DEBUG_TRACE_LEVEL "0" CACHE STRING "Level of debug tracing to perform.")
|
| 262 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -DCUTLASS_DEBUG_TRACE_LEVEL=${CUTLASS_DEBUG_TRACE_LEVEL})
|
| 263 |
+
|
| 264 |
+
set(CUTLASS_ENABLE_TENSOR_CORE_MMA ${CUTLASS_ENABLE_TENSOR_CORE_MMA_DEFAULT} CACHE BOOL
|
| 265 |
+
"Enable PTX mma instruction for collective matrix multiply operations.")
|
| 266 |
+
|
| 267 |
+
#
|
| 268 |
+
# NOTE: running with asan and CUDA requires the following environment variable:
|
| 269 |
+
#
|
| 270 |
+
# ASAN_OPTIONS=protect_shadow_gap=0:replace_intrin=0:detect_leaks=0
|
| 271 |
+
#
|
| 272 |
+
# without the above environment setting, an error like the following may be generated:
|
| 273 |
+
#
|
| 274 |
+
# *** Error: Could not detect active GPU device ID [out of memory]
|
| 275 |
+
# ...
|
| 276 |
+
# ==9149==ERROR: LeakSanitizer: detected memory leaks
|
| 277 |
+
# ...
|
| 278 |
+
#
|
| 279 |
+
if(ENABLE_ASAN) # https://github.com/google/sanitizers/wiki/AddressSanitizer
|
| 280 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS --compiler-options=-fsanitize=address --compiler-options=-fno-omit-frame-pointer)
|
| 281 |
+
string(APPEND CMAKE_EXE_LINKER_FLAGS " -fsanitize=address")
|
| 282 |
+
endif()
|
| 283 |
+
|
| 284 |
+
###################################################################################################
|
| 285 |
+
#
|
| 286 |
+
# Configure CUDA build options
|
| 287 |
+
#
|
| 288 |
+
###################################################################################################
|
| 289 |
+
|
| 290 |
+
if(CUTLASS_NVCC_EMBED_PTX)
|
| 291 |
+
list(APPEND CUTLASS_CUDA_CLANG_FLAGS --cuda-include-ptx=all)
|
| 292 |
+
endif()
|
| 293 |
+
|
| 294 |
+
if (CUTLASS_ENABLE_TENSOR_CORE_MMA)
|
| 295 |
+
list(APPEND CUTLASS_CUDA_FLAGS -DCUTLASS_ENABLE_TENSOR_CORE_MMA=1)
|
| 296 |
+
endif()
|
| 297 |
+
|
| 298 |
+
|
| 299 |
+
|
| 300 |
+
|
| 301 |
+
if (NOT MSVC AND CUTLASS_NVCC_KEEP)
|
| 302 |
+
# MSVC flow handles caching already, but for other generators we handle it here.
|
| 303 |
+
set(CUTLASS_NVCC_KEEP_DIR ${CMAKE_CURRENT_BINARY_DIR}/tmp CACHE PATH "Location to store NVCC scratch files")
|
| 304 |
+
file(MAKE_DIRECTORY ${CUTLASS_NVCC_KEEP_DIR})
|
| 305 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS --keep -v) # --keep-dir may not work with nvcc for some directories.
|
| 306 |
+
list(APPEND CUTLASS_CUDA_CLANG_FLAGS -save-temps=${CUTLASS_NVCC_KEEP_DIR})
|
| 307 |
+
endif()
|
| 308 |
+
|
| 309 |
+
if (CUTLASS_ENABLE_F16C AND NOT CMAKE_CROSSCOMPILING)
|
| 310 |
+
list(APPEND CUTLASS_CUDA_FLAGS -DCUTLASS_ENABLE_F16C=1)
|
| 311 |
+
if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
| 312 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -Xcompiler=-mf16c)
|
| 313 |
+
elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC"))
|
| 314 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -Xcompiler=/arch:AVX2)
|
| 315 |
+
endif()
|
| 316 |
+
endif()
|
| 317 |
+
|
| 318 |
+
if (CUTLASS_ENABLE_OPENMP_TESTS)
|
| 319 |
+
find_package(OpenMP)
|
| 320 |
+
if(OpenMP_CXX_FOUND)
|
| 321 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -Xcompiler=${OpenMP_CXX_FLAGS})
|
| 322 |
+
else()
|
| 323 |
+
message(WARNING "CUTLASS_ENABLE_OPENMP_TESTS set but OpenMP not found.")
|
| 324 |
+
endif()
|
| 325 |
+
endif()
|
| 326 |
+
if(UNIX)
|
| 327 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -Xcompiler=-Wconversion)
|
| 328 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -Xcompiler=-fno-strict-aliasing)
|
| 329 |
+
endif()
|
| 330 |
+
|
| 331 |
+
# Don't leak lineinfo in release builds
|
| 332 |
+
if (NOT CMAKE_BUILD_TYPE MATCHES "Release")
|
| 333 |
+
list(APPEND CUTLASS_CUDA_CLANG_FLAGS -gmlt)
|
| 334 |
+
list(APPEND CUTLASS_CUDA_NVCC_FLAGS -lineinfo)
|
| 335 |
+
endif()
|
| 336 |
+
|
| 337 |
+
#Report CUDA build flags
|
| 338 |
+
if (CUDA_COMPILER MATCHES "[Cc]lang")
|
| 339 |
+
if(CUTLASS_CUDA_CLANG_FLAGS)
|
| 340 |
+
message(STATUS "Using CLANG flags: ${CUTLASS_CUDA_CLANG_FLAGS}")
|
| 341 |
+
endif()
|
| 342 |
+
else()
|
| 343 |
+
if(CUTLASS_CUDA_NVCC_FLAGS)
|
| 344 |
+
message(STATUS "Using NVCC flags: ${CUTLASS_CUDA_NVCC_FLAGS}")
|
| 345 |
+
endif()
|
| 346 |
+
endif()
|
| 347 |
+
|
| 348 |
+
if(CUDA_COMPILER MATCHES "[Cc]lang")
|
| 349 |
+
if( NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
| 350 |
+
message(FATAL_ERROR "Clang CUDA compilation requires Clang CXX compilation. Currently CMAKE_CXX_COMPILER is ${CMAKE_CXX_COMPILER_ID}" )
|
| 351 |
+
endif()
|
| 352 |
+
|
| 353 |
+
# There are numerous Clang versions that can work with each CUDA toolkit and the
|
| 354 |
+
# the checks are not very useful so we are turning them off and using testing to
|
| 355 |
+
# ensure the various combinations work properly.
|
| 356 |
+
|
| 357 |
+
list(APPEND CUTLASS_CUDA_CLANG_FLAGS --cuda-path=${CUDA_TOOLKIT_ROOT_DIR})
|
| 358 |
+
list(APPEND CUTLASS_CUDA_CLANG_FLAGS -D__NV_NO_HOST_COMPILER_CHECK=1)
|
| 359 |
+
list(APPEND CUTLASS_CUDA_CLANG_FLAGS -Wno-unknown-cuda-version)
|
| 360 |
+
|
| 361 |
+
list(APPEND CUTLASS_CUDA_CLANG_FLAGS -mllvm -pragma-unroll-threshold=100000)
|
| 362 |
+
list(APPEND CUTLASS_CUDA_CLANG_FLAGS -mllvm -unroll-threshold=5000)
|
| 363 |
+
list(APPEND CUTLASS_CUDA_CLANG_FLAGS -Wno-unused-command-line-argument)
|
| 364 |
+
|
| 365 |
+
string(REPLACE "." ";" CUDA_VERSION_PARTS ${CMAKE_CUDA_COMPILER_VERSION})
|
| 366 |
+
list(GET CUDA_VERSION_PARTS 0 CUDA_VERSION_MAJOR)
|
| 367 |
+
list(GET CUDA_VERSION_PARTS 1 CUDA_VERSION_MINOR)
|
| 368 |
+
list(APPEND CUTLASS_CUDA_CLANG_FLAGS -D__CUDACC_VER_MAJOR__=${CUDA_VERSION_MAJOR} -D__CUDACC_VER_MINOR__=${CUDA_VERSION_MINOR})
|
| 369 |
+
|
| 370 |
+
|
| 371 |
+
# needed for libcublasLt.so in case it's installed in the same location as libcudart.so
|
| 372 |
+
# dynamic linker can find it if linker sets RPATH (forced by --disable-new-tags)
|
| 373 |
+
# Otherwise linker uses RUNPATH and that does not propagate to loaded libs.
|
| 374 |
+
list(APPEND CUTLASS_CUDA_CLANG_FLAGS -Wl,--disable-new-dtags)
|
| 375 |
+
|
| 376 |
+
link_libraries(nvidia::cudart)
|
| 377 |
+
link_libraries(nvidia::cuda_driver)
|
| 378 |
+
endif()
|
| 379 |
+
|
| 380 |
+
# Support for 128-bit integers if using NVIDIA C++ compiler
|
| 381 |
+
if (${CMAKE_CXX_COMPILER_ID} MATCHES "PGI" OR ${CMAKE_CXX_COMPILER_ID} MATCHES "NVHPC")
|
| 382 |
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Mint128 ")
|
| 383 |
+
endif()
|
| 384 |
+
|
| 385 |
+
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
|
| 386 |
+
# CMake 3.18 added support for CUDA_ARCHITECTURES target property. We will use this
|
| 387 |
+
# property for CMake 3.18+, so we request the NEW behavior for correct compatibility.
|
| 388 |
+
# https://cmake.org/cmake/help/v3.18/policy/CMP0104.html#policy:CMP0104
|
| 389 |
+
cmake_policy(SET CMP0104 NEW)
|
| 390 |
+
endif()
|
| 391 |
+
|
| 392 |
+
if (MSVC)
|
| 393 |
+
|
| 394 |
+
# MSVC by default does not apply the correct __cplusplus version as specified by the C++ standard
|
| 395 |
+
# because MSVC is not a completely compliant implementation. This option forces MSVC to use the
|
| 396 |
+
# appropriate value given the requested --std option. This fixes a compilation issue mismatch
|
| 397 |
+
# between GCC/Clang and MSVC.
|
| 398 |
+
#
|
| 399 |
+
# error : a constexpr function cannot have a nonliteral return type "dim3"
|
| 400 |
+
#
|
| 401 |
+
# See https://developercommunity.visualstudio.com/t/msvc-incorrectly-defines-cplusplus/139261
|
| 402 |
+
|
| 403 |
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
|
| 404 |
+
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler /Zc:__cplusplus")
|
| 405 |
+
|
| 406 |
+
endif()
|
| 407 |
+
|
| 408 |
+
# Some tests require this build option in order to link.
|
| 409 |
+
if (MSVC)
|
| 410 |
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
|
| 411 |
+
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler /bigobj")
|
| 412 |
+
endif()
|
| 413 |
+
|
| 414 |
+
function(cutlass_apply_cuda_gencode_flags TARGET)
|
| 415 |
+
set(options)
|
| 416 |
+
set(oneValueArgs)
|
| 417 |
+
set(multiValueArgs SM_ARCHS)
|
| 418 |
+
cmake_parse_arguments(_ "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
| 419 |
+
|
| 420 |
+
if (__SM_ARCHS)
|
| 421 |
+
set(ARCHS_ENABLED ${__SM_ARCHS})
|
| 422 |
+
else()
|
| 423 |
+
set(ARCHS_ENABLED ${CUTLASS_NVCC_ARCHS_ENABLED})
|
| 424 |
+
endif()
|
| 425 |
+
|
| 426 |
+
set(NVCC_FLAGS)
|
| 427 |
+
set(CLANG_FLAGS)
|
| 428 |
+
set(__CMAKE_CUDA_ARCHS)
|
| 429 |
+
foreach(ARCH ${ARCHS_ENABLED})
|
| 430 |
+
list(APPEND CLANG_FLAGS --cuda-gpu-arch=sm_${ARCH})
|
| 431 |
+
set(CODES)
|
| 432 |
+
if(CUTLASS_NVCC_EMBED_CUBIN)
|
| 433 |
+
list(APPEND CODES sm_${ARCH})
|
| 434 |
+
list(APPEND __CMAKE_CUDA_ARCHS ${ARCH}-real)
|
| 435 |
+
endif()
|
| 436 |
+
if(CUTLASS_NVCC_EMBED_PTX)
|
| 437 |
+
list(APPEND CODES compute_${ARCH})
|
| 438 |
+
list(APPEND __CMAKE_CUDA_ARCHS ${ARCH}-virtual)
|
| 439 |
+
endif()
|
| 440 |
+
list(JOIN CODES "," CODES_STR)
|
| 441 |
+
list(APPEND NVCC_FLAGS -gencode=arch=compute_${ARCH},code=[${CODES_STR}])
|
| 442 |
+
endforeach()
|
| 443 |
+
|
| 444 |
+
if (NOT __SM_ARCHS)
|
| 445 |
+
if (CUDA_COMPILER MATCHES "[Cc]lang")
|
| 446 |
+
target_compile_options(
|
| 447 |
+
${TARGET}
|
| 448 |
+
PRIVATE
|
| 449 |
+
$<$<COMPILE_LANGUAGE:CXX>:${CLANG_FLAGS}>
|
| 450 |
+
)
|
| 451 |
+
elseif(CMAKE_VERSION GREATER_EQUAL 3.18)
|
| 452 |
+
set_property(TARGET ${TARGET} PROPERTY CUDA_ARCHITECTURES ${__CMAKE_CUDA_ARCHS})
|
| 453 |
+
else()
|
| 454 |
+
target_compile_options(
|
| 455 |
+
${TARGET}
|
| 456 |
+
PRIVATE
|
| 457 |
+
$<$<COMPILE_LANGUAGE:CUDA>:${NVCC_FLAGS}>
|
| 458 |
+
)
|
| 459 |
+
endif()
|
| 460 |
+
else()
|
| 461 |
+
list(JOIN CLANG_FLAGS " " CLANG_FLAGS_STR)
|
| 462 |
+
list(JOIN NVCC_FLAGS " " STR_NVCC_FLAGS)
|
| 463 |
+
if (CUDA_COMPILER MATCHES "[Cc]lang")
|
| 464 |
+
if(${TARGET} MATCHES ".*\.cpp")
|
| 465 |
+
set_source_files_properties(${TARGET} PROPERTIES COMPILE_FLAGS ${CLANG_FLAGS_STR})
|
| 466 |
+
endif()
|
| 467 |
+
elseif(CMAKE_VERSION GREATER_EQUAL 3.18)
|
| 468 |
+
set_source_files_properties(${TARGET} PROPERTIES CUDA_ARCHITECTURES ${STR_NVCC_FLAGS})
|
| 469 |
+
else()
|
| 470 |
+
if(${TARGET} MATCHES ".*\.cu")
|
| 471 |
+
set_source_files_properties(${TARGET} PROPERTIES COMPILE_FLAGS ${STR_NVCC_FLAGS})
|
| 472 |
+
endif()
|
| 473 |
+
endif()
|
| 474 |
+
endif()
|
| 475 |
+
|
| 476 |
+
endfunction()
|
| 477 |
+
|
| 478 |
+
# Cache the flags so they are available when the function below is called anywhere globally.
|
| 479 |
+
|
| 480 |
+
set(__CUTLASS_CUDA_FLAGS ${CUTLASS_CUDA_FLAGS} CACHE INTERNAL "")
|
| 481 |
+
set(__CUTLASS_CUDA_FLAGS_RELEASE ${CUTLASS_CUDA_FLAGS_RELEASE} CACHE INTERNAL "")
|
| 482 |
+
set(__CUTLASS_CUDA_FLAGS_RELWITHDEBINFO ${CUTLASS_CUDA_FLAGS_RELWITHDEBINFO} CACHE INTERNAL "")
|
| 483 |
+
set(__CUTLASS_CUDA_FLAGS_DEBUG ${CUTLASS_CUDA_FLAGS_DEBUG} CACHE INTERNAL "")
|
| 484 |
+
set(__CUTLASS_CUDA_CLANG_FLAGS ${CUTLASS_CUDA_CLANG_FLAGS} CACHE INTERNAL "")
|
| 485 |
+
set(__CUTLASS_CUDA_CLANG_FLAGS_RELEASE ${CUTLASS_CUDA_CLANG_FLAGS_RELEASE} CACHE INTERNAL "")
|
| 486 |
+
set(__CUTLASS_CUDA_CLANG_FLAGS_RELWITHDEBINFO ${CUTLASS_CUDA_CLANG_FLAGS_RELWITHDEBINFO} CACHE INTERNAL "")
|
| 487 |
+
set(__CUTLASS_CUDA_CLANG_FLAGS_DEBUG ${CUTLASS_CUDA_CLANG_FLAGS_DEBUG} CACHE INTERNAL "")
|
| 488 |
+
set(__CUTLASS_CUDA_NVCC_FLAGS ${CUTLASS_CUDA_NVCC_FLAGS} CACHE INTERNAL "")
|
| 489 |
+
set(__CUTLASS_CUDA_NVCC_FLAGS_RELEASE ${CUTLASS_CUDA_NVCC_FLAGS_RELEASE} CACHE INTERNAL "")
|
| 490 |
+
set(__CUTLASS_CUDA_NVCC_FLAGS_RELWITHDEBINFO ${CUTLASS_CUDA_NVCC_FLAGS_RELWITHDEBINFO} CACHE INTERNAL "")
|
| 491 |
+
set(__CUTLASS_CUDA_NVCC_FLAGS_DEBUG ${CUTLASS_CUDA_NVCC_FLAGS_DEBUG} CACHE INTERNAL "")
|
| 492 |
+
|
| 493 |
+
function(cutlass_apply_standard_compile_options TARGET)
|
| 494 |
+
|
| 495 |
+
if(CUDA_COMPILER MATCHES "[Cc]lang")
|
| 496 |
+
set(CUDA_COMPILE_LANGUAGE CXX)
|
| 497 |
+
set(_FLAGS ${__CUTLASS_CUDA_FLAGS} ${__CUTLASS_CUDA_CLANG_FLAGS})
|
| 498 |
+
set(_FLAGS_RELEASE ${__CUTLASS_CUDA_FLAGS_RELEASE} ${__CUTLASS_CUDA_CLANG_FLAGS_RELEASE})
|
| 499 |
+
set(_FLAGS_RELWITHDEBINFO ${__CUTLASS_CUDA_FLAGS_RELWITHDEBINFO} ${__CUTLASS_CUDA_CLANG_FLAGS_RELWITHDEBINFO})
|
| 500 |
+
set(_FLAGS_DEBUG ${__CUTLASS_CUDA_FLAGS_DEBUG} ${__CUTLASS_CUDA_CLANG_FLAGS_DEBUG})
|
| 501 |
+
else()
|
| 502 |
+
set(CUDA_COMPILE_LANGUAGE CUDA)
|
| 503 |
+
set(_FLAGS ${__CUTLASS_CUDA_FLAGS} ${__CUTLASS_CUDA_NVCC_FLAGS})
|
| 504 |
+
set(_FLAGS_RELEASE ${__CUTLASS_CUDA_FLAGS_RELEASE} ${__CUTLASS_CUDA_NVCC_FLAGS_RELEASE})
|
| 505 |
+
set(_FLAGS_RELWITHDEBINFO ${__CUTLASS_CUDA_FLAGS_RELWITHDEBINFO} ${__CUTLASS_CUDA_NVCC_FLAGS_RELWITHDEBINFO})
|
| 506 |
+
set(_FLAGS_DEBUG ${__CUTLASS_CUDA_FLAGS_DEBUG} ${__CUTLASS_CUDA_NVCC_FLAGS_DEBUG})
|
| 507 |
+
endif()
|
| 508 |
+
|
| 509 |
+
target_link_libraries(${TARGET} PRIVATE CUTLASS)
|
| 510 |
+
|
| 511 |
+
target_compile_options(
|
| 512 |
+
${TARGET}
|
| 513 |
+
PRIVATE
|
| 514 |
+
$<$<COMPILE_LANGUAGE:${CUDA_COMPILE_LANGUAGE}>:${_FLAGS}>
|
| 515 |
+
$<$<COMPILE_LANGUAGE:${CUDA_COMPILE_LANGUAGE}>:$<$<CONFIG:RELEASE>:${_FLAGS_RELEASE}>>
|
| 516 |
+
$<$<COMPILE_LANGUAGE:${CUDA_COMPILE_LANGUAGE}>:$<$<CONFIG:RELWITHDEBINFO>:${_FLAGS_RELWITHDEBINFO}>>
|
| 517 |
+
$<$<COMPILE_LANGUAGE:${CUDA_COMPILE_LANGUAGE}>:$<$<CONFIG:DEBUG>:${_FLAGS_DEBUG}>>
|
| 518 |
+
)
|
| 519 |
+
|
| 520 |
+
endfunction()
|
| 521 |
+
|
| 522 |
+
#
|
| 523 |
+
# The following items should eventually be pushed into cutlass/CMakeLists.txt
|
| 524 |
+
#
|
| 525 |
+
|
| 526 |
+
# GLOB for CUTLASS header files. Should we use a static list instead?
|
| 527 |
+
file(GLOB_RECURSE CUTLASS_INCLUDE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/cutlass/*.h)
|
| 528 |
+
file(GLOB_RECURSE CUTLASS_CUTLASS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/include include/cutlass/*.h include/cutlass/*.hpp include/cutlass/*.inl)
|
| 529 |
+
file(GLOB_RECURSE CUTLASS_CUTE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/include include/cute/*.h*)
|
| 530 |
+
file(GLOB_RECURSE CUTLASS_NVRTC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/test test/unit/nvrtc/kernel/*.h)
|
| 531 |
+
|
| 532 |
+
###################################################################################################
|
| 533 |
+
#
|
| 534 |
+
# Define build targets
|
| 535 |
+
#
|
| 536 |
+
###################################################################################################
|
| 537 |
+
|
| 538 |
+
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include REGULAR_EXPRESSION ".*\.h")
|
| 539 |
+
|
| 540 |
+
add_library(CUTLASS INTERFACE)
|
| 541 |
+
add_library(nvidia::cutlass::cutlass ALIAS CUTLASS)
|
| 542 |
+
set_target_properties(CUTLASS PROPERTIES EXPORT_NAME cutlass)
|
| 543 |
+
|
| 544 |
+
set(CUTLASS_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE PATH "CUTLASS Header Library")
|
| 545 |
+
|
| 546 |
+
set(CUTLASS_GENERATOR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tools/library CACHE INTERNAL "Location of generator scripts")
|
| 547 |
+
|
| 548 |
+
# The following utility directory is needed even if the tools build is disabled, so it exists here.
|
| 549 |
+
set(CUTLASS_TOOLS_UTIL_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tools/util/include CACHE INTERNAL "")
|
| 550 |
+
|
| 551 |
+
include_directories(${CUTLASS_INCLUDE_DIR})
|
| 552 |
+
|
| 553 |
+
target_compile_features(CUTLASS INTERFACE cxx_std_11)
|
| 554 |
+
|
| 555 |
+
if (NOT CUTLASS_NAMESPACE STREQUAL "cutlass")
|
| 556 |
+
target_compile_definitions(CUTLASS INTERFACE CUTLASS_NAMESPACE=${CUTLASS_NAMESPACE})
|
| 557 |
+
endif()
|
| 558 |
+
|
| 559 |
+
if (NOT DEFINED CUTLASS_REVISION)
|
| 560 |
+
|
| 561 |
+
find_package(Git QUIET)
|
| 562 |
+
|
| 563 |
+
execute_process(
|
| 564 |
+
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
| 565 |
+
RESULT_VARIABLE CUTLASS_REVISION_RESULT
|
| 566 |
+
OUTPUT_VARIABLE CUTLASS_REVISION
|
| 567 |
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
| 568 |
+
)
|
| 569 |
+
|
| 570 |
+
if (CUTLASS_REVISION_RESULT)
|
| 571 |
+
message(STATUS "CUTLASS Revision: Unable to detect, Git returned code ${CUTLASS_REVISION_RESULT}.")
|
| 572 |
+
else()
|
| 573 |
+
message(STATUS "CUTLASS Revision: ${CUTLASS_REVISION}")
|
| 574 |
+
endif()
|
| 575 |
+
|
| 576 |
+
endif()
|
| 577 |
+
|
| 578 |
+
configure_file(
|
| 579 |
+
${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.h.in
|
| 580 |
+
${CMAKE_CURRENT_BINARY_DIR}/include/cutlass/version.h
|
| 581 |
+
@ONLY)
|
| 582 |
+
|
| 583 |
+
target_include_directories(
|
| 584 |
+
CUTLASS
|
| 585 |
+
INTERFACE
|
| 586 |
+
$<INSTALL_INTERFACE:include>
|
| 587 |
+
$<BUILD_INTERFACE:${CUTLASS_INCLUDE_DIR}>
|
| 588 |
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
|
| 589 |
+
$<BUILD_INTERFACE:${cute_SOURCE_DIR}/include>
|
| 590 |
+
$<BUILD_INTERFACE:${cute_SOURCE_DIR}/examples>
|
| 591 |
+
)
|
| 592 |
+
|
| 593 |
+
# Mark CTK headers as system to supress warnings from them
|
| 594 |
+
target_include_directories(
|
| 595 |
+
CUTLASS
|
| 596 |
+
SYSTEM INTERFACE
|
| 597 |
+
$<BUILD_INTERFACE:${CUDA_TOOLKIT_ROOT_DIR}/include>
|
| 598 |
+
)
|
| 599 |
+
|
| 600 |
+
install(
|
| 601 |
+
DIRECTORY
|
| 602 |
+
${CUTLASS_INCLUDE_DIR}/
|
| 603 |
+
${CMAKE_CURRENT_BINARY_DIR}/include/
|
| 604 |
+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
| 605 |
+
)
|
| 606 |
+
|
| 607 |
+
install(
|
| 608 |
+
TARGETS CUTLASS
|
| 609 |
+
EXPORT NvidiaCutlass
|
| 610 |
+
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
| 611 |
+
)
|
| 612 |
+
|
| 613 |
+
################################################################################
|
| 614 |
+
|
| 615 |
+
# Doxygen is available. Generate documentation
|
| 616 |
+
if (DOXYGEN_FOUND)
|
| 617 |
+
# DOT is available. Enable graph generation in the documentation
|
| 618 |
+
if (DOXYGEN_DOT_EXECUTABLE)
|
| 619 |
+
set(CUTLASS_ENABLE_DOXYGEN_DOT ON CACHE BOOL "Use dot to generate graphs in the doxygen documentation.")
|
| 620 |
+
else()
|
| 621 |
+
set(CUTLASS_ENABLE_DOXYGEN_DOT OFF CACHE BOOL "Use dot to generate graphs in the doxygen documentation." FORCE)
|
| 622 |
+
endif()
|
| 623 |
+
|
| 624 |
+
if (CUTLASS_ENABLE_DOXYGEN_DOT)
|
| 625 |
+
set(HAVE_DOT "YES")
|
| 626 |
+
else()
|
| 627 |
+
set(HAVE_DOT "NO")
|
| 628 |
+
endif()
|
| 629 |
+
|
| 630 |
+
# Add custom target for Doxygen.
|
| 631 |
+
add_custom_target(cutlass_docs ${CMAKE_COMMAND} -E env
|
| 632 |
+
"DOT_PATH=${DOXYGEN_DOT_EXECUTABLE}"
|
| 633 |
+
"HAVE_DOT=${HAVE_DOT}"
|
| 634 |
+
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
|
| 635 |
+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
| 636 |
+
VERBATIM
|
| 637 |
+
)
|
| 638 |
+
endif()
|
| 639 |
+
|
| 640 |
+
if(NOT WIN32)
|
| 641 |
+
# Add common library search paths so executables and libraries can load and run
|
| 642 |
+
# without LD_LIBRARY_PATH being set.
|
| 643 |
+
link_libraries(
|
| 644 |
+
"-Wl,-rpath,'$ORIGIN'"
|
| 645 |
+
"-Wl,-rpath,'$ORIGIN/../lib64'"
|
| 646 |
+
"-Wl,-rpath,'$ORIGIN/../lib'"
|
| 647 |
+
"-Wl,-rpath,'${CUDA_TOOLKIT_ROOT_DIR}/lib64'"
|
| 648 |
+
"-Wl,-rpath,'${CUDA_TOOLKIT_ROOT_DIR}/lib'"
|
| 649 |
+
)
|
| 650 |
+
endif()
|
| 651 |
+
|
| 652 |
+
################################################################################
|
| 653 |
+
|
| 654 |
+
include(CTest)
|
| 655 |
+
enable_testing()
|
| 656 |
+
|
| 657 |
+
if (CUTLASS_ENABLE_GTEST_UNIT_TESTS)
|
| 658 |
+
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/googletest.cmake)
|
| 659 |
+
endif()
|
| 660 |
+
|
| 661 |
+
if (NOT TARGET test_all)
|
| 662 |
+
add_custom_target(test_all)
|
| 663 |
+
endif()
|
| 664 |
+
|
| 665 |
+
set(CUTLASS_INSTALL_TESTS ON CACHE BOOL "Install test executables")
|
| 666 |
+
set(CUTLASS_TEST_EXECUTION_ENVIRONMENT "" CACHE BOOL "Environment in which to invoke unit test executables")
|
| 667 |
+
|
| 668 |
+
set(CMAKE_TEST_INSTALL_PREFIX test CACHE STRING "Test root install location, relative to CMAKE_INSTALL_PREFIX.")
|
| 669 |
+
set(CUTLASS_TEST_INSTALL_PREFIX ${CMAKE_TEST_INSTALL_PREFIX}/cutlass CACHE STRING "Test root install location, relative to CMAKE_INSTALL_PREFIX.")
|
| 670 |
+
set(CUTLASS_TEST_INSTALL_BINDIR ${CUTLASS_TEST_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR} CACHE STRING "Test root install location, relative to CMAKE_INSTALL_PREFIX.")
|
| 671 |
+
set(CUTLASS_TEST_INSTALL_LIBDIR ${CUTLASS_TEST_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} CACHE STRING "Test root install location, relative to CMAKE_INSTALL_PREFIX.")
|
| 672 |
+
|
| 673 |
+
install(DIRECTORY DESTINATION ${CUTLASS_TEST_INSTALL_PREFIX})
|
| 674 |
+
install(DIRECTORY DESTINATION ${CUTLASS_TEST_INSTALL_BINDIR})
|
| 675 |
+
install(DIRECTORY DESTINATION ${CUTLASS_TEST_INSTALL_LIBDIR})
|
| 676 |
+
install(DIRECTORY DESTINATION ${CUTLASS_TEST_INSTALL_PREFIX}/ctest)
|
| 677 |
+
|
| 678 |
+
################################################################################
|
| 679 |
+
|
| 680 |
+
set(CUTLASS_ENABLE_CUBLAS OFF CACHE BOOL "cuBLAS usage for tests")
|
| 681 |
+
set(CUTLASS_ENABLE_CUDNN OFF CACHE BOOL "cuDNN usage for tests")
|
| 682 |
+
|
| 683 |
+
include(${CMAKE_CURRENT_SOURCE_DIR}/cuBLAS.cmake)
|
| 684 |
+
|
| 685 |
+
if (CUTLASS_ENABLE_CUBLAS)
|
| 686 |
+
target_compile_definitions(CUTLASS INTERFACE CUTLASS_ENABLE_CUBLAS=1)
|
| 687 |
+
endif()
|
| 688 |
+
|
| 689 |
+
include(${CMAKE_CURRENT_SOURCE_DIR}/cuDNN.cmake)
|
| 690 |
+
|
| 691 |
+
if (CUTLASS_ENABLE_CUDNN)
|
| 692 |
+
target_compile_definitions(CUTLASS INTERFACE CUTLASS_ENABLE_CUDNN=1)
|
| 693 |
+
endif()
|
| 694 |
+
|
| 695 |
+
################################################################################
|
| 696 |
+
|
| 697 |
+
set(CUTLASS_CTEST_TEMPLATE_FILE ${CMAKE_CURRENT_LIST_DIR}/cmake/CTestTestfile.configure.cmake)
|
| 698 |
+
set(CUTLASS_CTEST_GENERATED_FILES "" CACHE INTERNAL "")
|
| 699 |
+
|
| 700 |
+
function(cutlass_add_executable_tests NAME TARGET)
|
| 701 |
+
#
|
| 702 |
+
# Generates test rules for `make test`, `make test_all`, and `ctest` invoked from either the
|
| 703 |
+
# <CMAKE_BINARY_DIR> or the <CMAKE_INSTALL_PREFIX>/<CUTLASS_TEST_INSTALL_PREFIX> after installation.
|
| 704 |
+
#
|
| 705 |
+
# NAME: The base name for the test. Can be run with `make <NAME>` or `ctest -R 'c<NAME>'`.
|
| 706 |
+
# TARGET: The target corresponding to the executable under test.
|
| 707 |
+
# DISABLE_EXECUTABLE_INSTALL_RULE: An option, if given, that disables creating an install rule for TARGET.
|
| 708 |
+
# DEPENDS: A list of targets or files on which this test is dependent.
|
| 709 |
+
# DEPENDEES: A list of targets which should depend on this test.
|
| 710 |
+
# TEST_COMMAND_OPTIONS: A list of variables (i.e. by reference params) which contain command line arguments
|
| 711 |
+
# to pass to the test executable. A unique test is generated for each set of
|
| 712 |
+
# options given. If this option is not used, a single test with no arguments is generated.
|
| 713 |
+
# TEST_COMMAND_OPTIONS_PREFIX: If provided, is added as a prefix to each TEST_COMMAND_OPTIONS value for
|
| 714 |
+
# generating the full variable name to be referenced.
|
| 715 |
+
# RESULT_CACHE_FILE: A file to be installed alongside the test executable with pre-computed
|
| 716 |
+
# test results to speed up test runtime.
|
| 717 |
+
#
|
| 718 |
+
|
| 719 |
+
set(options DISABLE_EXECUTABLE_INSTALL_RULE)
|
| 720 |
+
set(oneValueArgs DISABLE_TESTS RESULT_CACHE_FILE TEST_COMMAND_OPTIONS_PREFIX)
|
| 721 |
+
set(multiValueArgs DEPENDS DEPENDEES TEST_COMMAND_OPTIONS)
|
| 722 |
+
cmake_parse_arguments(_ "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
| 723 |
+
|
| 724 |
+
if (NOT DEFINED __DISABLE_TESTS)
|
| 725 |
+
set(__DISABLE_TESTS OFF)
|
| 726 |
+
endif()
|
| 727 |
+
|
| 728 |
+
set(TEST_EXE $<TARGET_FILE_NAME:${TARGET}>)
|
| 729 |
+
set(TEST_EXE_WORKING_DIRECTORY ./${CMAKE_INSTALL_BINDIR})
|
| 730 |
+
|
| 731 |
+
if (__RESULT_CACHE_FILE)
|
| 732 |
+
|
| 733 |
+
add_custom_command(
|
| 734 |
+
TARGET ${TARGET}
|
| 735 |
+
POST_BUILD
|
| 736 |
+
COMMAND ${CMAKE_COMMAND}
|
| 737 |
+
ARGS -E copy ${__RESULT_CACHE_FILE} "$<TARGET_FILE_DIR:${TARGET}>"
|
| 738 |
+
)
|
| 739 |
+
|
| 740 |
+
endif()
|
| 741 |
+
|
| 742 |
+
if (NOT __DISABLE_EXECUTABLE_INSTALL_RULE AND CUTLASS_INSTALL_TESTS)
|
| 743 |
+
|
| 744 |
+
# file(RELATIVE_PATH CMAKE_CURRENT_BINARY_RELATIVE_DIR ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
| 745 |
+
|
| 746 |
+
install(
|
| 747 |
+
TARGETS ${TARGET}
|
| 748 |
+
RUNTIME DESTINATION ${CUTLASS_TEST_INSTALL_BINDIR}
|
| 749 |
+
)
|
| 750 |
+
|
| 751 |
+
if (__RESULT_CACHE_FILE)
|
| 752 |
+
|
| 753 |
+
install(
|
| 754 |
+
FILES ${__RESULT_CACHE_FILE}
|
| 755 |
+
DESTINATION ${CUTLASS_TEST_INSTALL_BINDIR}/
|
| 756 |
+
)
|
| 757 |
+
|
| 758 |
+
endif()
|
| 759 |
+
|
| 760 |
+
endif()
|
| 761 |
+
|
| 762 |
+
if (NOT __TEST_COMMAND_OPTIONS)
|
| 763 |
+
set(__TEST_COMMAND_OPTIONS " ")
|
| 764 |
+
endif()
|
| 765 |
+
|
| 766 |
+
list(LENGTH __TEST_COMMAND_OPTIONS CMD_COUNT)
|
| 767 |
+
|
| 768 |
+
if (CMD_COUNT GREATER 1)
|
| 769 |
+
add_custom_target(${NAME} DEPENDS ${TARGET} ${__DEPENDS})
|
| 770 |
+
foreach(DEPENDEE ${__DEPENDEES})
|
| 771 |
+
add_dependencies(${DEPENDEE} ${NAME})
|
| 772 |
+
endforeach()
|
| 773 |
+
endif()
|
| 774 |
+
|
| 775 |
+
if (CUTLASS_INSTALL_TESTS)
|
| 776 |
+
|
| 777 |
+
set(_INLINE_PER_TEST_CODE)
|
| 778 |
+
|
| 779 |
+
file(READ "${PROJECT_SOURCE_DIR}/cmake/CTestTestfile.test.configure.cmake" _INLINE_PER_TEST_CODE_TEMPLATE)
|
| 780 |
+
|
| 781 |
+
endif()
|
| 782 |
+
|
| 783 |
+
set(TEST_GROUP_NAME ${NAME})
|
| 784 |
+
|
| 785 |
+
foreach(CMD_OPTIONS_VAR IN LISTS __TEST_COMMAND_OPTIONS)
|
| 786 |
+
|
| 787 |
+
if (CMD_COUNT GREATER 1)
|
| 788 |
+
string(TOLOWER "${NAME}_${CMD_OPTIONS_VAR}" TEST_NAME)
|
| 789 |
+
else()
|
| 790 |
+
string(TOLOWER "${NAME}" TEST_NAME)
|
| 791 |
+
endif()
|
| 792 |
+
|
| 793 |
+
# The following rigmarole is needed to deal with spaces and possible quotes in
|
| 794 |
+
# command line arguments. The options are passed "by reference" as the actual
|
| 795 |
+
# variable names holding the real options. We then expand these in a way that
|
| 796 |
+
# preserves any quotes. Note, they have to be in this order for it to work for
|
| 797 |
+
# all the use cases below.
|
| 798 |
+
|
| 799 |
+
set(TEST_COMMAND_OPTIONS ${${__TEST_COMMAND_OPTIONS_PREFIX}${CMD_OPTIONS_VAR}})
|
| 800 |
+
list(JOIN TEST_COMMAND_OPTIONS " " TEST_COMMAND_OPTIONS)
|
| 801 |
+
separate_arguments(TEST_COMMAND_OPTIONS)
|
| 802 |
+
|
| 803 |
+
add_custom_target(
|
| 804 |
+
${TEST_NAME}
|
| 805 |
+
COMMAND
|
| 806 |
+
${CUTLASS_TEST_EXECUTION_ENVIRONMENT} $<TARGET_FILE:${TARGET}> ${TEST_COMMAND_OPTIONS}
|
| 807 |
+
DEPENDS
|
| 808 |
+
${TARGET}
|
| 809 |
+
)
|
| 810 |
+
|
| 811 |
+
if (CMD_COUNT GREATER 1)
|
| 812 |
+
add_dependencies(${NAME} ${TEST_NAME})
|
| 813 |
+
endif()
|
| 814 |
+
|
| 815 |
+
foreach(DEPENDEE ${__DEPENDEES})
|
| 816 |
+
add_dependencies(${DEPENDEE} ${TEST_NAME})
|
| 817 |
+
endforeach()
|
| 818 |
+
|
| 819 |
+
set(TEST_NAME c${TEST_NAME})
|
| 820 |
+
string(CONFIGURE "${_INLINE_PER_TEST_CODE_TEMPLATE}" _TEST_CODE @ONLY)
|
| 821 |
+
string(APPEND _INLINE_PER_TEST_CODE "${_TEST_CODE}")
|
| 822 |
+
|
| 823 |
+
endforeach()
|
| 824 |
+
|
| 825 |
+
# To run the tests from an install package with tests enabled, we need to generate test files
|
| 826 |
+
# that don't rely on the current directory structure in build.
|
| 827 |
+
|
| 828 |
+
set(TEST_NAME c${NAME})
|
| 829 |
+
set(TEST_GEN_DIR ${CMAKE_CURRENT_BINARY_DIR}/ctest/${TEST_NAME})
|
| 830 |
+
file(MAKE_DIRECTORY ${TEST_GEN_DIR})
|
| 831 |
+
|
| 832 |
+
set(TEST_EXE_PATH $<TARGET_FILE:${TARGET}>)
|
| 833 |
+
set(TEST_USE_EXTENDED_FORMAT ON)
|
| 834 |
+
configure_file("${CUTLASS_CTEST_TEMPLATE_FILE}" "${TEST_GEN_DIR}/CTestTestfile.${TEST_NAME}.cmake" @ONLY)
|
| 835 |
+
|
| 836 |
+
set(TEST_EXE_PATH $<TARGET_FILE_NAME:${TARGET}>)
|
| 837 |
+
set(TEST_USE_EXTENDED_FORMAT OFF) # ctest does not support extended add_test format.
|
| 838 |
+
configure_file("${CUTLASS_CTEST_TEMPLATE_FILE}" "${TEST_GEN_DIR}/CTestTestfile.${TEST_NAME}.install.cmake.in" @ONLY)
|
| 839 |
+
|
| 840 |
+
# The following line imports the tests for immediate run via `make test`.
|
| 841 |
+
|
| 842 |
+
include(${TEST_GEN_DIR}/CTestTestfile.${TEST_NAME}.cmake)
|
| 843 |
+
|
| 844 |
+
set(CUTLASS_CTEST_GENERATED_FILES ${CUTLASS_CTEST_GENERATED_FILES};ctest/${TEST_NAME}/CTestTestfile.${TEST_NAME}.cmake CACHE INTERNAL "")
|
| 845 |
+
|
| 846 |
+
if (CUTLASS_INSTALL_TESTS)
|
| 847 |
+
|
| 848 |
+
file(GENERATE
|
| 849 |
+
OUTPUT "${TEST_GEN_DIR}/CTestTestfile.${TEST_NAME}.install.cmake"
|
| 850 |
+
INPUT "${TEST_GEN_DIR}/CTestTestfile.${TEST_NAME}.install.cmake.in"
|
| 851 |
+
)
|
| 852 |
+
|
| 853 |
+
install(
|
| 854 |
+
FILES "${TEST_GEN_DIR}/CTestTestfile.${TEST_NAME}.install.cmake"
|
| 855 |
+
DESTINATION ${CUTLASS_TEST_INSTALL_PREFIX}/ctest/${TEST_NAME}
|
| 856 |
+
RENAME CTestTestfile.${TEST_NAME}.cmake
|
| 857 |
+
)
|
| 858 |
+
|
| 859 |
+
endif()
|
| 860 |
+
|
| 861 |
+
endfunction()
|
| 862 |
+
|
| 863 |
+
if (CUTLASS_ENABLE_TOOLS)
|
| 864 |
+
add_subdirectory(tools)
|
| 865 |
+
if (CUTLASS_ENABLE_PROFILER)
|
| 866 |
+
add_dependencies(test_all test_profiler)
|
| 867 |
+
endif()
|
| 868 |
+
endif()
|
| 869 |
+
|
| 870 |
+
if (CUTLASS_ENABLE_EXAMPLES)
|
| 871 |
+
add_subdirectory(examples)
|
| 872 |
+
add_dependencies(test_all test_examples)
|
| 873 |
+
endif()
|
| 874 |
+
|
| 875 |
+
if (CUTLASS_ENABLE_TESTS)
|
| 876 |
+
add_subdirectory(test)
|
| 877 |
+
if (CUTLASS_ENABLE_GTEST_UNIT_TESTS)
|
| 878 |
+
add_dependencies(test_all test_unit)
|
| 879 |
+
endif()
|
| 880 |
+
endif()
|
| 881 |
+
|
| 882 |
+
if (CUTLASS_INSTALL_TESTS)
|
| 883 |
+
|
| 884 |
+
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/ctest")
|
| 885 |
+
|
| 886 |
+
file(WRITE "${CMAKE_BINARY_DIR}/ctest/CTestTestfile.cmake" "# Generated File\n")
|
| 887 |
+
foreach(GENERATED_FILE ${CUTLASS_CTEST_GENERATED_FILES})
|
| 888 |
+
file(APPEND "${CMAKE_BINARY_DIR}/ctest/CTestTestfile.cmake" "include(${GENERATED_FILE})\n")
|
| 889 |
+
endforeach()
|
| 890 |
+
|
| 891 |
+
install(
|
| 892 |
+
FILES "${CMAKE_BINARY_DIR}/ctest/CTestTestfile.cmake"
|
| 893 |
+
DESTINATION "${CUTLASS_TEST_INSTALL_PREFIX}/"
|
| 894 |
+
)
|
| 895 |
+
|
| 896 |
+
endif()
|
| 897 |
+
|
| 898 |
+
################################################################################
|
| 899 |
+
|
| 900 |
+
include(CMakePackageConfigHelpers)
|
| 901 |
+
|
| 902 |
+
write_basic_package_version_file(
|
| 903 |
+
${CMAKE_CURRENT_BINARY_DIR}/NvidiaCutlassConfigVersion.cmake
|
| 904 |
+
COMPATIBILITY AnyNewerVersion)
|
| 905 |
+
|
| 906 |
+
install(
|
| 907 |
+
FILES
|
| 908 |
+
${CMAKE_CURRENT_SOURCE_DIR}/cmake/NvidiaCutlassConfig.cmake
|
| 909 |
+
${CMAKE_CURRENT_BINARY_DIR}/NvidiaCutlassConfigVersion.cmake
|
| 910 |
+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/NvidiaCutlass/
|
| 911 |
+
)
|
| 912 |
+
|
| 913 |
+
install(
|
| 914 |
+
EXPORT NvidiaCutlass
|
| 915 |
+
NAMESPACE nvidia::cutlass::
|
| 916 |
+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/NvidiaCutlass/
|
| 917 |
+
FILE NvidiaCutlassTargets.cmake
|
| 918 |
+
)
|
| 919 |
+
|
| 920 |
+
################################################################################
|
| 921 |
+
|
| 922 |
+
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/NvidiaCutlassPackageConfig.cmake)
|
| 923 |
+
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/CONTRIBUTORS.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+

|
| 2 |
+
|
| 3 |
+
[README](/README.md#documentation) > **Contributors**
|
| 4 |
+
|
| 5 |
+
# CUTLASS Developers and Contributors
|
| 6 |
+
|
| 7 |
+
This is the official list of CUTLASS developers and contributors.
|
| 8 |
+
|
| 9 |
+
## DEVELOPERS
|
| 10 |
+
Vijay Thakkar<br />
|
| 11 |
+
Pradeep Ramani<br />
|
| 12 |
+
Cris Cecka<br />
|
| 13 |
+
Aniket Shivam<br />
|
| 14 |
+
Jack Kosaian<br />
|
| 15 |
+
Mark Hoemmen<br />
|
| 16 |
+
Honghao Lu<br />
|
| 17 |
+
Ethan Yan<br />
|
| 18 |
+
Haicheng Wu<br />
|
| 19 |
+
Andrew Kerr<br />
|
| 20 |
+
Dustyn Blasig<br />
|
| 21 |
+
Fengqi Qiao<br />
|
| 22 |
+
Duane Merrill<br />
|
| 23 |
+
Yujia Zhai<br />
|
| 24 |
+
Shang Zhang<br />
|
| 25 |
+
Piotr Majcher<br />
|
| 26 |
+
Paul Springer<br />
|
| 27 |
+
Markus Hohnerbach<br />
|
| 28 |
+
Jin Wang<br />
|
| 29 |
+
Aditya Atluri<br />
|
| 30 |
+
|
| 31 |
+
## CuTe
|
| 32 |
+
Cris Cecka<br />
|
| 33 |
+
Vijay Thakkar<br />
|
| 34 |
+
|
| 35 |
+
## CUTLASS Product Manager
|
| 36 |
+
Matthew Nicely<br />
|
| 37 |
+
|
| 38 |
+
## Former CUTLASS Developers
|
| 39 |
+
Manish Gupta<br />
|
| 40 |
+
Naila Farooqui<br />
|
| 41 |
+
David Tanner<br />
|
| 42 |
+
Manikandan Ananth<br />
|
| 43 |
+
Zhaodong Chen<br />
|
| 44 |
+
Chinmay Talegaonkar<br />
|
| 45 |
+
|
| 46 |
+
## CONTRIBUTORS
|
| 47 |
+
Timothy Costa<br />
|
| 48 |
+
Julien Demouth<br />
|
| 49 |
+
Brian Fahs<br />
|
| 50 |
+
Michael Garland<br />
|
| 51 |
+
Michael Goldfarb<br />
|
| 52 |
+
Mostafa Hagog<br />
|
| 53 |
+
Fei Hu<br />
|
| 54 |
+
Alan Kaatz<br />
|
| 55 |
+
Tina Li<br />
|
| 56 |
+
Timmy Liu<br />
|
| 57 |
+
Wei Liu<br />
|
| 58 |
+
Duane Merrill<br />
|
| 59 |
+
Kevin Siu<br />
|
| 60 |
+
Markus Tavenrath<br />
|
| 61 |
+
John Tran<br />
|
| 62 |
+
Vicki Wang<br />
|
| 63 |
+
Junkai Wu<br />
|
| 64 |
+
Fung Xie<br />
|
| 65 |
+
Albert Xu<br />
|
| 66 |
+
Yang Xu<br />
|
| 67 |
+
Jack Yang<br />
|
| 68 |
+
Scott Yokim<br />
|
| 69 |
+
Xiuxia Zhang<br />
|
| 70 |
+
Nick Zhao<br />
|
| 71 |
+
|
| 72 |
+
## ACKNOWLEDGEMENTS
|
| 73 |
+
|
| 74 |
+
Girish Bharambe<br />
|
| 75 |
+
Luke Durant<br />
|
| 76 |
+
Carter Edwards<br />
|
| 77 |
+
Olivier Giroux<br />
|
| 78 |
+
Stephen Jones<br />
|
| 79 |
+
Rishkul Kulkarni<br />
|
| 80 |
+
Bryce Lelbach<br />
|
| 81 |
+
Joel McCormack<br />
|
| 82 |
+
Kyrylo Perelygin<br />
|
| 83 |
+
Sean Treichler<br />
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/CUDA.cmake
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2017 - 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
#
|
| 4 |
+
# Redistribution and use in source and binary forms, with or without
|
| 5 |
+
# modification, are permitted provided that the following conditions are met:
|
| 6 |
+
#
|
| 7 |
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
| 8 |
+
# list of conditions and the following disclaimer.
|
| 9 |
+
#
|
| 10 |
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
| 11 |
+
# this list of conditions and the following disclaimer in the documentation
|
| 12 |
+
# and/or other materials provided with the distribution.
|
| 13 |
+
#
|
| 14 |
+
# 3. Neither the name of the copyright holder nor the names of its
|
| 15 |
+
# contributors may be used to endorse or promote products derived from
|
| 16 |
+
# this software without specific prior written permission.
|
| 17 |
+
#
|
| 18 |
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 19 |
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 20 |
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 21 |
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 22 |
+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 23 |
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 24 |
+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 25 |
+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 26 |
+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 27 |
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 28 |
+
|
| 29 |
+
if(CUDA_COMPILER MATCHES "[Cc]lang")
|
| 30 |
+
set(CUTLASS_NATIVE_CUDA_INIT ON)
|
| 31 |
+
elseif(CMAKE_VERSION VERSION_LESS 3.12.4)
|
| 32 |
+
set(CUTLASS_NATIVE_CUDA_INIT OFF)
|
| 33 |
+
else()
|
| 34 |
+
set(CUTLASS_NATIVE_CUDA_INIT ON)
|
| 35 |
+
endif()
|
| 36 |
+
|
| 37 |
+
set(CUTLASS_NATIVE_CUDA ${CUTLASS_NATIVE_CUDA_INIT} CACHE BOOL "Utilize the CMake native CUDA flow")
|
| 38 |
+
|
| 39 |
+
if(NOT DEFINED ENV{CUDACXX} AND NOT DEFINED ENV{CUDA_BIN_PATH} AND DEFINED ENV{CUDA_PATH})
|
| 40 |
+
# For backward compatibility, allow use of CUDA_PATH.
|
| 41 |
+
set(ENV{CUDACXX} $ENV{CUDA_PATH}/bin/nvcc)
|
| 42 |
+
endif()
|
| 43 |
+
|
| 44 |
+
if(CUTLASS_NATIVE_CUDA)
|
| 45 |
+
|
| 46 |
+
enable_language(CUDA)
|
| 47 |
+
|
| 48 |
+
if(NOT CUDA_VERSION)
|
| 49 |
+
set(CUDA_VERSION ${CMAKE_CUDA_COMPILER_VERSION})
|
| 50 |
+
endif()
|
| 51 |
+
if(NOT CUDA_TOOLKIT_ROOT_DIR)
|
| 52 |
+
get_filename_component(CUDA_TOOLKIT_ROOT_DIR "${CMAKE_CUDA_COMPILER}/../.." ABSOLUTE)
|
| 53 |
+
endif()
|
| 54 |
+
|
| 55 |
+
else()
|
| 56 |
+
|
| 57 |
+
find_package(CUDA REQUIRED)
|
| 58 |
+
# We workaround missing variables with the native flow by also finding the CUDA toolkit the old way.
|
| 59 |
+
|
| 60 |
+
if(NOT CMAKE_CUDA_COMPILER_VERSION)
|
| 61 |
+
set(CMAKE_CUDA_COMPILER_VERSION ${CUDA_VERSION})
|
| 62 |
+
endif()
|
| 63 |
+
|
| 64 |
+
endif()
|
| 65 |
+
|
| 66 |
+
if (CUDA_VERSION VERSION_LESS 9.2)
|
| 67 |
+
message(FATAL_ERROR "CUDA 9.2+ Required, Found ${CUDA_VERSION}.")
|
| 68 |
+
endif()
|
| 69 |
+
if(NOT CUTLASS_NATIVE_CUDA OR CUDA_COMPILER MATCHES "[Cc]lang")
|
| 70 |
+
set(CMAKE_CUDA_COMPILER ${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc)
|
| 71 |
+
message(STATUS "CUDA Compiler: ${CMAKE_CUDA_COMPILER}")
|
| 72 |
+
endif()
|
| 73 |
+
|
| 74 |
+
find_library(
|
| 75 |
+
CUDART_LIBRARY cudart
|
| 76 |
+
PATHS
|
| 77 |
+
${CUDA_TOOLKIT_ROOT_DIR}
|
| 78 |
+
PATH_SUFFIXES
|
| 79 |
+
lib/x86_64-linux-gnu
|
| 80 |
+
lib/x64
|
| 81 |
+
lib64
|
| 82 |
+
lib
|
| 83 |
+
NO_DEFAULT_PATH
|
| 84 |
+
# We aren't going to search any system paths. We want to find the runtime
|
| 85 |
+
# in the CUDA toolkit we're building against.
|
| 86 |
+
)
|
| 87 |
+
|
| 88 |
+
if(NOT TARGET cudart AND CUDART_LIBRARY)
|
| 89 |
+
|
| 90 |
+
message(STATUS "CUDART: ${CUDART_LIBRARY}")
|
| 91 |
+
|
| 92 |
+
if(WIN32)
|
| 93 |
+
add_library(cudart STATIC IMPORTED GLOBAL)
|
| 94 |
+
# Even though we're linking against a .dll, in Windows you statically link against
|
| 95 |
+
# the .lib file found under lib/x64. The .dll will be loaded at runtime automatically
|
| 96 |
+
# from the PATH search.
|
| 97 |
+
else()
|
| 98 |
+
add_library(cudart SHARED IMPORTED GLOBAL)
|
| 99 |
+
endif()
|
| 100 |
+
|
| 101 |
+
add_library(nvidia::cudart ALIAS cudart)
|
| 102 |
+
|
| 103 |
+
set_property(
|
| 104 |
+
TARGET cudart
|
| 105 |
+
PROPERTY IMPORTED_LOCATION
|
| 106 |
+
${CUDART_LIBRARY}
|
| 107 |
+
)
|
| 108 |
+
|
| 109 |
+
elseif(TARGET cudart)
|
| 110 |
+
|
| 111 |
+
message(STATUS "CUDART: Already Found")
|
| 112 |
+
|
| 113 |
+
else()
|
| 114 |
+
|
| 115 |
+
message(STATUS "CUDART: Not Found")
|
| 116 |
+
|
| 117 |
+
endif()
|
| 118 |
+
|
| 119 |
+
find_library(
|
| 120 |
+
CUDA_DRIVER_LIBRARY cuda
|
| 121 |
+
PATHS
|
| 122 |
+
${CUDA_TOOLKIT_ROOT_DIR}
|
| 123 |
+
PATH_SUFFIXES
|
| 124 |
+
lib/x86_64-linux-gnu
|
| 125 |
+
lib/x64
|
| 126 |
+
lib64
|
| 127 |
+
lib
|
| 128 |
+
lib64/stubs
|
| 129 |
+
lib/stubs
|
| 130 |
+
NO_DEFAULT_PATH
|
| 131 |
+
# We aren't going to search any system paths. We want to find the runtime
|
| 132 |
+
# in the CUDA toolkit we're building against.
|
| 133 |
+
)
|
| 134 |
+
|
| 135 |
+
if(NOT TARGET cuda_driver AND CUDA_DRIVER_LIBRARY)
|
| 136 |
+
|
| 137 |
+
message(STATUS "CUDA Driver: ${CUDA_DRIVER_LIBRARY}")
|
| 138 |
+
|
| 139 |
+
if(WIN32)
|
| 140 |
+
add_library(cuda_driver STATIC IMPORTED GLOBAL)
|
| 141 |
+
# Even though we're linking against a .dll, in Windows you statically link against
|
| 142 |
+
# the .lib file found under lib/x64. The .dll will be loaded at runtime automatically
|
| 143 |
+
# from the PATH search.
|
| 144 |
+
else()
|
| 145 |
+
add_library(cuda_driver SHARED IMPORTED GLOBAL)
|
| 146 |
+
endif()
|
| 147 |
+
|
| 148 |
+
add_library(nvidia::cuda_driver ALIAS cuda_driver)
|
| 149 |
+
|
| 150 |
+
set_property(
|
| 151 |
+
TARGET cuda_driver
|
| 152 |
+
PROPERTY IMPORTED_LOCATION
|
| 153 |
+
${CUDA_DRIVER_LIBRARY}
|
| 154 |
+
)
|
| 155 |
+
|
| 156 |
+
elseif(TARGET cuda_driver)
|
| 157 |
+
|
| 158 |
+
message(STATUS "CUDA Driver: Already Found")
|
| 159 |
+
|
| 160 |
+
else()
|
| 161 |
+
|
| 162 |
+
message(STATUS "CUDA Driver: Not Found")
|
| 163 |
+
|
| 164 |
+
endif()
|
| 165 |
+
|
| 166 |
+
find_library(
|
| 167 |
+
NVRTC_LIBRARY nvrtc
|
| 168 |
+
PATHS
|
| 169 |
+
${CUDA_TOOLKIT_ROOT_DIR}
|
| 170 |
+
PATH_SUFFIXES
|
| 171 |
+
lib/x64
|
| 172 |
+
lib64
|
| 173 |
+
lib
|
| 174 |
+
NO_DEFAULT_PATH
|
| 175 |
+
# We aren't going to search any system paths. We want to find the runtime
|
| 176 |
+
# in the CUDA toolkit we're building against.
|
| 177 |
+
)
|
| 178 |
+
|
| 179 |
+
if(NOT TARGET nvrtc AND NVRTC_LIBRARY)
|
| 180 |
+
|
| 181 |
+
message(STATUS "NVRTC: ${NVRTC_LIBRARY}")
|
| 182 |
+
|
| 183 |
+
if(WIN32)
|
| 184 |
+
add_library(nvrtc STATIC IMPORTED GLOBAL)
|
| 185 |
+
# Even though we're linking against a .dll, in Windows you statically link against
|
| 186 |
+
# the .lib file found under lib/x64. The .dll will be loaded at runtime automatically
|
| 187 |
+
# from the PATH search.
|
| 188 |
+
else()
|
| 189 |
+
add_library(nvrtc SHARED IMPORTED GLOBAL)
|
| 190 |
+
endif()
|
| 191 |
+
|
| 192 |
+
add_library(nvidia::nvrtc ALIAS nvrtc)
|
| 193 |
+
|
| 194 |
+
set_property(
|
| 195 |
+
TARGET nvrtc
|
| 196 |
+
PROPERTY IMPORTED_LOCATION
|
| 197 |
+
${NVRTC_LIBRARY}
|
| 198 |
+
)
|
| 199 |
+
|
| 200 |
+
elseif(TARGET nvrtc)
|
| 201 |
+
|
| 202 |
+
message(STATUS "NVRTC: Already Found")
|
| 203 |
+
|
| 204 |
+
else()
|
| 205 |
+
|
| 206 |
+
message(STATUS "NVRTC: Not Found")
|
| 207 |
+
|
| 208 |
+
endif()
|
| 209 |
+
|
| 210 |
+
include_directories(SYSTEM ${CUDA_INCLUDE_DIRS})
|
| 211 |
+
# Some platforms (e.g. Visual Studio) don't add the CUDA include directories to the system include
|
| 212 |
+
# paths by default, so we add it explicitly here.
|
| 213 |
+
|
| 214 |
+
function(cutlass_correct_source_file_language_property)
|
| 215 |
+
if(CUDA_COMPILER MATCHES "[Cc]lang")
|
| 216 |
+
foreach(File ${ARGN})
|
| 217 |
+
if(File MATCHES ".*\.cu$")
|
| 218 |
+
set_source_files_properties(${File} PROPERTIES LANGUAGE CXX)
|
| 219 |
+
endif()
|
| 220 |
+
endforeach()
|
| 221 |
+
endif()
|
| 222 |
+
endfunction()
|
| 223 |
+
|
| 224 |
+
if (MSVC OR CUTLASS_LIBRARY_KERNELS MATCHES "all")
|
| 225 |
+
set(CUTLASS_UNITY_BUILD_ENABLED_INIT ON)
|
| 226 |
+
else()
|
| 227 |
+
set(CUTLASS_UNITY_BUILD_ENABLED_INIT OFF)
|
| 228 |
+
endif()
|
| 229 |
+
|
| 230 |
+
set(CUTLASS_UNITY_BUILD_ENABLED ${CUTLASS_UNITY_BUILD_ENABLED_INIT} CACHE BOOL "Enable combined source compilation")
|
| 231 |
+
|
| 232 |
+
if (MSVC)
|
| 233 |
+
set(CUTLASS_UNITY_BUILD_BATCH_SIZE_INIT 8)
|
| 234 |
+
else()
|
| 235 |
+
set(CUTLASS_UNITY_BUILD_BATCH_SIZE_INIT 16)
|
| 236 |
+
endif()
|
| 237 |
+
|
| 238 |
+
set(CUTLASS_UNITY_BUILD_BATCH_SIZE ${CUTLASS_UNITY_BUILD_BATCH_SIZE_INIT} CACHE STRING "Batch size for unified source files")
|
| 239 |
+
|
| 240 |
+
function(cutlass_unify_source_files TARGET_ARGS_VAR)
|
| 241 |
+
|
| 242 |
+
set(options)
|
| 243 |
+
set(oneValueArgs BATCH_SOURCES BATCH_SIZE)
|
| 244 |
+
set(multiValueArgs)
|
| 245 |
+
cmake_parse_arguments(_ "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
| 246 |
+
|
| 247 |
+
if (NOT DEFINED TARGET_ARGS_VAR)
|
| 248 |
+
message(FATAL_ERROR "TARGET_ARGS_VAR parameter is required")
|
| 249 |
+
endif()
|
| 250 |
+
|
| 251 |
+
if (__BATCH_SOURCES AND NOT DEFINED __BATCH_SIZE)
|
| 252 |
+
set(__BATCH_SIZE ${CUTLASS_UNITY_BUILD_BATCH_SIZE})
|
| 253 |
+
endif()
|
| 254 |
+
|
| 255 |
+
if (CUTLASS_UNITY_BUILD_ENABLED AND DEFINED __BATCH_SIZE AND __BATCH_SIZE GREATER 1)
|
| 256 |
+
|
| 257 |
+
set(CUDA_FILE_ARGS)
|
| 258 |
+
set(TARGET_SOURCE_ARGS)
|
| 259 |
+
|
| 260 |
+
foreach(ARG ${__UNPARSED_ARGUMENTS})
|
| 261 |
+
if(${ARG} MATCHES ".*\.cu$")
|
| 262 |
+
list(APPEND CUDA_FILE_ARGS ${ARG})
|
| 263 |
+
else()
|
| 264 |
+
list(APPEND TARGET_SOURCE_ARGS ${ARG})
|
| 265 |
+
endif()
|
| 266 |
+
endforeach()
|
| 267 |
+
|
| 268 |
+
list(LENGTH CUDA_FILE_ARGS NUM_CUDA_FILE_ARGS)
|
| 269 |
+
while(NUM_CUDA_FILE_ARGS GREATER 0)
|
| 270 |
+
list(SUBLIST CUDA_FILE_ARGS 0 ${__BATCH_SIZE} CUDA_FILE_BATCH)
|
| 271 |
+
string(SHA256 CUDA_FILE_BATCH_HASH "${CUDA_FILE_BATCH}")
|
| 272 |
+
string(SUBSTRING ${CUDA_FILE_BATCH_HASH} 0 12 CUDA_FILE_BATCH_HASH)
|
| 273 |
+
set(BATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.unity.${CUDA_FILE_BATCH_HASH}.cu)
|
| 274 |
+
message(STATUS "Generating ${BATCH_FILE}")
|
| 275 |
+
file(WRITE ${BATCH_FILE} "// Unity File - Auto Generated!\n")
|
| 276 |
+
foreach(CUDA_FILE ${CUDA_FILE_BATCH})
|
| 277 |
+
get_filename_component(CUDA_FILE_ABS_PATH ${CUDA_FILE} ABSOLUTE)
|
| 278 |
+
file(APPEND ${BATCH_FILE} "#include \"${CUDA_FILE_ABS_PATH}\"\n")
|
| 279 |
+
endforeach()
|
| 280 |
+
list(APPEND TARGET_SOURCE_ARGS ${BATCH_FILE})
|
| 281 |
+
if (NUM_CUDA_FILE_ARGS LESS_EQUAL __BATCH_SIZE)
|
| 282 |
+
break()
|
| 283 |
+
endif()
|
| 284 |
+
list(SUBLIST CUDA_FILE_ARGS ${__BATCH_SIZE} -1 CUDA_FILE_ARGS)
|
| 285 |
+
list(LENGTH CUDA_FILE_ARGS NUM_CUDA_FILE_ARGS)
|
| 286 |
+
endwhile()
|
| 287 |
+
|
| 288 |
+
else()
|
| 289 |
+
|
| 290 |
+
set(TARGET_SOURCE_ARGS ${__UNPARSED_ARGUMENTS})
|
| 291 |
+
|
| 292 |
+
endif()
|
| 293 |
+
|
| 294 |
+
set(${TARGET_ARGS_VAR} ${TARGET_SOURCE_ARGS} PARENT_SCOPE)
|
| 295 |
+
|
| 296 |
+
endfunction()
|
| 297 |
+
function(cutlass_add_library NAME)
|
| 298 |
+
|
| 299 |
+
set(options SKIP_GENCODE_FLAGS)
|
| 300 |
+
set(oneValueArgs EXPORT_NAME)
|
| 301 |
+
set(multiValueArgs)
|
| 302 |
+
cmake_parse_arguments(_ "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
| 303 |
+
|
| 304 |
+
cutlass_unify_source_files(TARGET_SOURCE_ARGS ${__UNPARSED_ARGUMENTS})
|
| 305 |
+
|
| 306 |
+
if(CUTLASS_NATIVE_CUDA OR CUDA_COMPILER MATCHES "clang")
|
| 307 |
+
cutlass_correct_source_file_language_property(${TARGET_SOURCE_ARGS})
|
| 308 |
+
add_library(${NAME} ${TARGET_SOURCE_ARGS} "")
|
| 309 |
+
else()
|
| 310 |
+
set(CUDA_LINK_LIBRARIES_KEYWORD PRIVATE)
|
| 311 |
+
cuda_add_library(${NAME} ${TARGET_SOURCE_ARGS} "")
|
| 312 |
+
endif()
|
| 313 |
+
|
| 314 |
+
cutlass_apply_standard_compile_options(${NAME})
|
| 315 |
+
if (NOT __SKIP_GENCODE_FLAGS)
|
| 316 |
+
cutlass_apply_cuda_gencode_flags(${NAME})
|
| 317 |
+
endif()
|
| 318 |
+
|
| 319 |
+
target_compile_features(
|
| 320 |
+
${NAME}
|
| 321 |
+
INTERFACE
|
| 322 |
+
cxx_std_11
|
| 323 |
+
)
|
| 324 |
+
|
| 325 |
+
if(__EXPORT_NAME)
|
| 326 |
+
add_library(nvidia::cutlass::${__EXPORT_NAME} ALIAS ${NAME})
|
| 327 |
+
set_target_properties(${NAME} PROPERTIES EXPORT_NAME ${__EXPORT_NAME})
|
| 328 |
+
endif()
|
| 329 |
+
|
| 330 |
+
endfunction()
|
| 331 |
+
|
| 332 |
+
function(cutlass_add_executable NAME)
|
| 333 |
+
|
| 334 |
+
set(options)
|
| 335 |
+
set(oneValueArgs)
|
| 336 |
+
set(multiValueArgs)
|
| 337 |
+
cmake_parse_arguments(_ "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
| 338 |
+
|
| 339 |
+
cutlass_unify_source_files(TARGET_SOURCE_ARGS ${__UNPARSED_ARGUMENTS})
|
| 340 |
+
|
| 341 |
+
if(CUTLASS_NATIVE_CUDA OR CUDA_COMPILER MATCHES "clang")
|
| 342 |
+
cutlass_correct_source_file_language_property(${TARGET_SOURCE_ARGS})
|
| 343 |
+
add_executable(${NAME} ${TARGET_SOURCE_ARGS})
|
| 344 |
+
else()
|
| 345 |
+
set(CUDA_LINK_LIBRARIES_KEYWORD PRIVATE)
|
| 346 |
+
cuda_add_executable(${NAME} ${TARGET_SOURCE_ARGS})
|
| 347 |
+
endif()
|
| 348 |
+
|
| 349 |
+
cutlass_apply_standard_compile_options(${NAME})
|
| 350 |
+
cutlass_apply_cuda_gencode_flags(${NAME})
|
| 351 |
+
|
| 352 |
+
target_compile_features(
|
| 353 |
+
${NAME}
|
| 354 |
+
INTERFACE
|
| 355 |
+
cxx_std_11
|
| 356 |
+
)
|
| 357 |
+
|
| 358 |
+
endfunction()
|
| 359 |
+
|
| 360 |
+
function(cutlass_target_sources NAME)
|
| 361 |
+
|
| 362 |
+
set(options)
|
| 363 |
+
set(oneValueArgs)
|
| 364 |
+
set(multiValueArgs)
|
| 365 |
+
cmake_parse_arguments(_ "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
| 366 |
+
|
| 367 |
+
cutlass_unify_source_files(TARGET_SOURCE_ARGS ${__UNPARSED_ARGUMENTS})
|
| 368 |
+
cutlass_correct_source_file_language_property(${TARGET_SOURCE_ARGS})
|
| 369 |
+
target_sources(${NAME} ${TARGET_SOURCE_ARGS})
|
| 370 |
+
|
| 371 |
+
endfunction()
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/Doxyfile
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/LICENSE.txt
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) 2017 - 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
1. Redistributions of source code must retain the above copyright notice, this
|
| 8 |
+
list of conditions and the following disclaimer.
|
| 9 |
+
|
| 10 |
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
| 11 |
+
this list of conditions and the following disclaimer in the documentation
|
| 12 |
+
and/or other materials provided with the distribution.
|
| 13 |
+
|
| 14 |
+
3. Neither the name of the copyright holder nor the names of its
|
| 15 |
+
contributors may be used to endorse or promote products derived from
|
| 16 |
+
this software without specific prior written permission.
|
| 17 |
+
|
| 18 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 19 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 20 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 21 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 22 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 23 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 24 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 25 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 26 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 27 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/PUBLICATIONS.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Publications Using Cutlass
|
| 2 |
+
|
| 3 |
+
## 2023
|
| 4 |
+
|
| 5 |
+
- ["FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning"](https://arxiv.org/abs/2307.08691). Tri Dao. _Technical Report_, July 2023.
|
| 6 |
+
|
| 7 |
+
- ["ByteTransformer: A High-Performance Transformer Boosted for Variable-Length Inputs"](https://arxiv.org/abs/2210.03052). Yujia Zhai, Chengquan Jiang, Leyuan Wang, Xiaoying Jia, Shang Zhang, Zizhong Chen, Xin Liu, Yibo Zhu. _Proceedings of the 37th IEEE International Parallel & Distributed Processing Symposium (Best Paper)_, May 2023.
|
| 8 |
+
|
| 9 |
+
- ["A Framework for Fine-Grained Synchronization of Dependent GPU Kernels"](https://arxiv.org/abs/2305.13450). Abhinav Jangda, Saeed Maleki, Maryam Mehri Dehnavi, Madan Musuvathi, Olli Saarikivi. _Computing Research Repository_, May 2023.
|
| 10 |
+
|
| 11 |
+
- ["Graphene: An IR for Optimized Tensor Computations on GPUs"](https://dl.acm.org/doi/pdf/10.1145/3582016.3582018). Hagedorn, Bastian, Bin Fan, Hanfeng Chen, Cris Cecka, Michael Garland, Vinod Grover. _Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems_, March 2023.
|
| 12 |
+
|
| 13 |
+
- ["Stream-K: Work-centric Parallel Decomposition for Dense Matrix-Matrix Multiplication on the GPU"](https://arxiv.org/abs/2301.03598). Muhammad Osama, Duane Merrill, Cris Cecka, Michael Garland, John D. Owens. _arXiv_, January 2023.
|
| 14 |
+
|
| 15 |
+
## 2022
|
| 16 |
+
|
| 17 |
+
- ["GPU Load Balancing"](https://arxiv.org/abs/2212.08964). Muhammad Osama. _Doctoral dissertation, University of California, Davis_, December 2022.
|
| 18 |
+
|
| 19 |
+
- ["Who Says Elephants Can't Run: Bringing Large Scale MoE Models into Cloud Scale Production"](https://arxiv.org/abs/2211.10017). Young Jin Kim, Rawn Henry, Raffy Fahim, Hany Hassan Awadalla. _Proceedings of the Third Workshop on Simple and Efficient Natural Language Processing_, December 2022.
|
| 20 |
+
|
| 21 |
+
- ["Bolt: Bridging the Gap between Auto-tuners and Hardware-native Performance"](https://arxiv.org/abs/2110.15238). Jiarong Xing, Leyuan Wang, Shang Zhang, Jack Chen, Ang Chen, Yibo Zhu. _Proceedings of the 5th MLSys Conference_, August 2022.
|
| 22 |
+
|
| 23 |
+
- ["Recovering single precision accuracy from Tensor Cores while surpassing the FP32 theoretical peak performance"](https://arxiv.org/abs/2203.03341). Hiroyuki Ootomo, Rio Yokota. _International Journal of High Performance Computing_, March 2022.
|
| 24 |
+
|
| 25 |
+
- ["Breaking the Computation and Communication Abstraction Barrier in Distributed Machine Learning Workloads"](https://arxiv.org/abs/2105.05720). Abhinav Jangda, Jun Huang, Guodong Liu, Amir Hossein Nodehi Sabet, Saeed Maleki, Youshan Miao, Madanlal Musuvathi, Todd Mytkowicz, Olli Sarikivi. _Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems_, February 2022.
|
| 26 |
+
|
| 27 |
+
## 2021
|
| 28 |
+
|
| 29 |
+
- ["Arithmetic-intensity-guided fault tolerance for neural network inference on GPUs"](https://dl.acm.org/doi/abs/10.1145/3458817.3476184). Jack Kosaian, K. V. Rashmi. _Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis_, November 2021.
|
| 30 |
+
|
| 31 |
+
- ["Real-time Neural Radiance Caching for Path Tracing"](https://dl.acm.org/doi/abs/10.1145/3450626.3459812). Thomas Muller, Fabrice Rousselle, Jan Novak, Alex Keller. _ACM Trans. Graph._, August 2021.
|
| 32 |
+
|
| 33 |
+
## 2020
|
| 34 |
+
|
| 35 |
+
- ["Scalable Knowledge Graph Analytics at 136 Petaflop/s"](https://www.computer.org/csdl/proceedings-article/sc/2020/999800a061/1oeORDgCM0g). Ramakrishnan Kannan, Piyush Sao, Hao Lu, Drahomira Herrmannova, Vijay Thakkar, Robert Patton, Richard Vuduc, Thomas Potok. _Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis_, November 2020.
|
| 36 |
+
|
| 37 |
+
- ["Accelerating Sparse DNN Models without Hardware-Support via Tile-Wise Sparsity
|
| 38 |
+
"](https://arxiv.org/abs/2008.13006). Cong Guo, Bo Yang Hsueh, Jingwen Leng, Yuxian Qiu, Yue Guan, Zehuan Wang, Xiaoying Jia, Xipeng Li, Minyi Guo, Yuhao Zhu. _Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis_, November 2020.
|
| 39 |
+
|
| 40 |
+
- ["Strassen's Algorithm Reloaded on GPUs"](https://dl.acm.org/doi/10.1145/3372419). Jianyu Huang, Chenhan D. Yu, Robert A. van de Geijn. _ACM Transactions on Mathematical Software_, March 2020.
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/README.md
ADDED
|
@@ -0,0 +1,570 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+

|
| 2 |
+
|
| 3 |
+
# CUTLASS 3.2
|
| 4 |
+
|
| 5 |
+
_CUTLASS 3.2 - August 2023_
|
| 6 |
+
|
| 7 |
+
CUTLASS is a collection of CUDA C++ template abstractions for implementing
|
| 8 |
+
high-performance matrix-matrix multiplication (GEMM) and related computations at all levels
|
| 9 |
+
and scales within CUDA. It incorporates strategies for hierarchical decomposition and
|
| 10 |
+
data movement similar to those used to implement cuBLAS and cuDNN. CUTLASS decomposes
|
| 11 |
+
these "moving parts" into reusable, modular software components abstracted by C++ template
|
| 12 |
+
classes. Primitives for different levels of a conceptual parallelization hierarchy
|
| 13 |
+
can be specialized and tuned via custom tiling sizes, data types,
|
| 14 |
+
and other algorithmic policy. The resulting flexibility simplifies their use
|
| 15 |
+
as building blocks within custom kernels and applications.
|
| 16 |
+
|
| 17 |
+
To support a wide variety of applications, CUTLASS provides extensive support for
|
| 18 |
+
mixed-precision computations, providing specialized data-movement and
|
| 19 |
+
multiply-accumulate abstractions for half-precision floating
|
| 20 |
+
point (FP16), BFloat16 (BF16), Tensor Float 32 (TF32),
|
| 21 |
+
single-precision floating point (FP32),
|
| 22 |
+
[FP32 emulation via tensor core instruction](/examples/27_ampere_3xtf32_fast_accurate_tensorop_gemm),
|
| 23 |
+
double-precision floating
|
| 24 |
+
point (FP64) types, integer data types (4b and 8b), and binary data types (1b).
|
| 25 |
+
CUTLASS demonstrates warp-synchronous matrix multiply operations
|
| 26 |
+
targeting the programmable, high-throughput _Tensor Cores_ implemented by
|
| 27 |
+
NVIDIA's Volta, Turing, Ampere, and Hopper architectures.
|
| 28 |
+
|
| 29 |
+
See the [Quick Start Guide](/media/docs/quickstart.md) to get started quickly.
|
| 30 |
+
|
| 31 |
+
See the [functionality listing](/media/docs/functionality.md) for the list of operations
|
| 32 |
+
supported at each level of the execution model hierarchy.
|
| 33 |
+
|
| 34 |
+
CUTLASS 3.0 introduced a new core library, CuTe, to describe and manipulate tensors of threads and data.
|
| 35 |
+
CuTe is a collection of C++ CUDA template abstractions for defining and operating on hierarchically multidimensional layouts of threads and data. CuTe provides `Layout` and `Tensor` objects that compactly package the type, shape, memory space, and layout of data, while performing the complicated indexing for the user. This lets programmers focus on the logical descriptions of their algorithms while CuTe does the mechanical bookkeeping for them. With these tools, we can quickly design, implement, and modify all dense linear algebra operations.
|
| 36 |
+
|
| 37 |
+
The core abstractions of CuTe are hierarchically multidimensional layouts which can be composed with data arrays to represent tensors. The representation of layouts is powerful enough to represent nearly everything we need to implement efficient dense linear algebra. Layouts can also be combined and manipulated via functional composition, on which we build a large set of common operations such as tiling and partitioning.
|
| 38 |
+
|
| 39 |
+
CUTLASS 3.0 and beyond adopts CuTe throughout the GEMM hierarchy in its templates. This greatly simplifies the design
|
| 40 |
+
and improves code composability and readability. More documentation specific to CuTe can be found in its [dedicated documentation directory](/media/docs/cute/00_quickstart.md).
|
| 41 |
+
|
| 42 |
+
In addition to GEMMs, CUTLASS implements high-performance convolution via the implicit GEMM algorithm. Implicit GEMM is the formulation of a convolution operation as a GEMM thereby taking advantage of CUTLASS's modular GEMM pipeline. This allows CUTLASS to build convolutions by reusing highly-optimized GEMM components.
|
| 43 |
+
|
| 44 |
+
# What's New in CUTLASS 3.2
|
| 45 |
+
|
| 46 |
+
CUTLASS 3.2.0 is an update to CUTLASS adding:
|
| 47 |
+
- New warp-specialized persistent FP8 GEMM kernel [kernel schedules](/include/cutlass/gemm/kernel/sm90_gemm_tma_warpspecialized_cooperative.hpp) and [mainloops](/include/cutlass/gemm/collective/sm90_mma_tma_gmma_ss_warpspecialized_fp8.hpp) targeting Hopper architecture that achieve great performance with TMA, WGMMA, and threadblock clusters. An example showcasing [Hopper warp-specialized FP8 GEMMs](/examples/54_hopper_fp8_warp_specialized_gemm).
|
| 48 |
+
- New [Epilogue Visitor Tree (EVT)](/examples/49_hopper_gemm_with_collective_builder/49_collective_builder.cu) support for Hopper TMA epilogues. EVTs allows for user-defined customized epilogue fusion patterns without having to write a new epilogue.
|
| 49 |
+
- [Stream-K](/include/cutlass/gemm/kernel/sm90_tile_scheduler_stream_k.hpp) feature for Hopper. Note that this is only a functional implementation of stream-K, and should not be used for performance comparison. Optimizations are expected in a future release.
|
| 50 |
+
- Improved CTA rasterization and support for CTA swizzling for Hopper kernels using the [Tile Scheduler](/include/cutlass/gemm/kernel/sm90_tile_scheduler.hpp).
|
| 51 |
+
- Improved performance for [warp-specialized TensorFloat-32 (TF32) GEMM kernels](test/unit/gemm/device/sm90_gemm_tf32_tf32_f32_tensor_op_f32_gmma_rs_cluster_warpspecialized.cu) targeting Hopper TMA.
|
| 52 |
+
- [Hopper GEMM+Permute](/examples/53_hopper_gemm_permute/53_hopper_gemm_permute.cu), an example of fusing tensor reordering (permutation) with GEMM mainloop or epilogue.
|
| 53 |
+
- New CUTLASS 2D Convolution Python interface. New [example](/examples/python/03_basic_conv2d.ipynb) here.
|
| 54 |
+
- Support for Windows (MSVC) builds.
|
| 55 |
+
|
| 56 |
+
CUTLASS 3.2.1 is an update to CUTLASS adding:
|
| 57 |
+
- Python support SM90 Epilogue Visitor Tree (EVT) on top of the C++ support released in 3.2.0.
|
| 58 |
+
- SM80 EVT support in C++ and Python.
|
| 59 |
+
- Splitting CUTLASS library into smaller units based on operation, arch and datatypes. See [1105](https://github.com/NVIDIA/cutlass/discussions/1105) for details.
|
| 60 |
+
- Making `tools/library/scripts` packageable - `tools/library/scripts` is now moving to `python/cutlass_library`. See the Python [README](/python/README.md) for details.
|
| 61 |
+
- SM90 TF32 kernel improvements for all layouts.
|
| 62 |
+
- SM90 rasterization direction support in the CUTLASS profiler.
|
| 63 |
+
- Improvement for CUTLASS profiler build times.
|
| 64 |
+
|
| 65 |
+
CUTLASS 3.2.2 is a minor update to CUTLASS adding:
|
| 66 |
+
- Bug fix for illegal memory access issue hit by Flash Attention tests in PyTorch. See [1138](https://github.com/NVIDIA/cutlass/issues/1138) for details.
|
| 67 |
+
|
| 68 |
+
Minimum requirements:
|
| 69 |
+
|
| 70 |
+
- Architecture: Volta
|
| 71 |
+
- Compiler: Must support at least C++17
|
| 72 |
+
- CUDA Toolkit version: 11.4
|
| 73 |
+
|
| 74 |
+
Starting from CUTLASS 3.0, CUTLASS removed support for the following:
|
| 75 |
+
|
| 76 |
+
- Maxwell and Pascal GPU architectures
|
| 77 |
+
- Ubuntu 16.04
|
| 78 |
+
- CUDA 10.2
|
| 79 |
+
- C++ language versions less than 17.
|
| 80 |
+
|
| 81 |
+
**See the [CHANGELOG](CHANGELOG.md) for a detailed listing of releases and updates.**
|
| 82 |
+
|
| 83 |
+
# Performance
|
| 84 |
+
|
| 85 |
+
<p align="center"><img src=media/images/cutlass-3.1-gemm-peak-performance.png></p>
|
| 86 |
+
|
| 87 |
+
CUTLASS primitives are very efficient. When used to construct device-wide GEMM kernels,
|
| 88 |
+
they exhibit peak performance comparable to cuBLAS for scalar GEMM
|
| 89 |
+
computations. The above figure shows CUTLASS performance relative to cuBLAS
|
| 90 |
+
for large matrix dimensions on an [NVIDIA H100](https://www.nvidia.com/en-us/data-center/h100/) (NVIDIA Hopper architecture),
|
| 91 |
+
an [NVIDIA L40](https://www.nvidia.com/en-us/data-center/l40/) (NVIDIA Ada architecture),
|
| 92 |
+
an [NVIDIA A100](https://www.nvidia.com/en-us/data-center/a100/) (NVIDIA Ampere architecture),
|
| 93 |
+
and an [NVIDIA A40](https://www.nvidia.com/en-us/data-center/a40/) (NVIDIA Ampere architecture).
|
| 94 |
+
CUTLASS 3.0 was compiled with the [CUDA 12.0 Toolkit](https://developer.nvidia.com/cuda-downloads).
|
| 95 |
+
Tensor Core operations are implemented using CUDA's
|
| 96 |
+
[mma](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-instructions-mma) and
|
| 97 |
+
[wgmma](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions) instructions.
|
| 98 |
+
|
| 99 |
+
<p align="center"><img src=media/images/cutlass-2.9-implicit-gemm-performance.png></p>
|
| 100 |
+
|
| 101 |
+
When using CUTLASS building blocks to construct device-wide implicit gemm (Fprop, Dgrad, and Wgrad)
|
| 102 |
+
kernels, CUTLASS performance is also comparable to cuDNN when running Resnet-50 layers on an [NVIDIA A100](https://www.nvidia.com/en-us/data-center/a100/)
|
| 103 |
+
as shown in the above figure. Tensor Core operations are implemented using CUDA's
|
| 104 |
+
[mma instruction](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-instructions-mma).
|
| 105 |
+
|
| 106 |
+
# Compatibility
|
| 107 |
+
|
| 108 |
+
CUTLASS requires a C++17 host compiler and
|
| 109 |
+
performs best when built with the [**CUDA 12.2 Toolkit**](https://developer.nvidia.com/cuda-toolkit).
|
| 110 |
+
It is also compatible with CUDA 11.4, CUDA 11.5, CUDA 11.6, CUDA 11.7, CUDA 11.8, CUDA 12.0 and CUDA 12.1.
|
| 111 |
+
|
| 112 |
+
## Operating Systems
|
| 113 |
+
We have tested the following environments.
|
| 114 |
+
|
| 115 |
+
|**Operating System** | **Compiler** |
|
| 116 |
+
|-----------------|----------|
|
| 117 |
+
| Ubuntu 18.04 | GCC 7.5.0 |
|
| 118 |
+
| Ubuntu 20.04 | GCC 10.3.0 |
|
| 119 |
+
| Ubuntu 22.04 | GCC 11.2.0 |
|
| 120 |
+
| Windows 10.0 | Visual Studio 2019 v16.11.27 |
|
| 121 |
+
|
| 122 |
+
Note: We plan to add Clang compiler support soon.
|
| 123 |
+
Note: GCC 8.5.0 has known regressions regarding fold expressions and overloaded operators. Using GCC 7.5.0 or (preferred) GCC >= 9 is recommended.
|
| 124 |
+
|
| 125 |
+
## Hardware
|
| 126 |
+
CUTLASS runs successfully on the following NVIDIA GPUs, and it is expected to be efficient on Volta, Turing, Ampere, Ada, and Hopper architecture based NVIDIA GPUs.
|
| 127 |
+
|
| 128 |
+
|**GPU**|**CUDA Compute Capability**|**Minimum CUDA Toolkit Required by CUTLASS-3**|
|
| 129 |
+
|---|---|---|
|
| 130 |
+
|NVIDIA V100 Tensor Core GPU |7.0|11.4|
|
| 131 |
+
|NVIDIA TitanV |7.0|11.4|
|
| 132 |
+
|NVIDIA GeForce RTX 2080 TI, 2080, 2070 |7.5|11.4|
|
| 133 |
+
|NVIDIA T4 |7.5|11.4|
|
| 134 |
+
|NVIDIA A100 Tensor Core GPU |8.0|11.4|
|
| 135 |
+
|NVIDIA A10 |8.6|11.4|
|
| 136 |
+
|NVIDIA GeForce RTX 3090 |8.6|11.4|
|
| 137 |
+
|NVIDIA GeForce RTX 4090 |8.9|11.8|
|
| 138 |
+
|NVIDIA L40 |8.9|11.8|
|
| 139 |
+
|NVIDIA H100 Tensor Core GPU |9.0|11.8|
|
| 140 |
+
|
| 141 |
+
## Target Architecture
|
| 142 |
+
|
| 143 |
+
In general, PTX code generated for one target architecture can be run on future architectures (i.e., it is forward compatible). However, CUDA 12.0 introduced the concept of "architecture-accelerated features" whose PTX does not have forward compatibility guarantees. Several Hopper PTX instructions fall under this category of architecture-accelerated features, and thus require a `sm_90a` target architecture (note the "a" appended). For more details on this and other architecture-accelerated instructions, please refer to the [CUDA Documentation](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#feature-availability).
|
| 144 |
+
|
| 145 |
+
The target architecture information is passed on to CUTLASS via the cmake flag `CUTLASS_NVCC_ARCHS`. In order to maximize performance on Hopper GH100, users are required to build CUTLASS with `90a` as the target architecture. If a user accidentally builds a kernel which uses SM90a features (e.g. Hopper Tensor Core Instructions), using the SM90 target (note the lack of "a"), with either CTK 12 or 11.8, the kernel is expected to fail with a runtime error.
|
| 146 |
+
|
| 147 |
+
```
|
| 148 |
+
cmake .. -DCUTLASS_NVCC_ARCHS="90a"
|
| 149 |
+
```
|
| 150 |
+
|
| 151 |
+
Please refer to the [functionality documentation](media/docs/functionality.md) for details on which kernels require which target architectures.
|
| 152 |
+
|
| 153 |
+
# Documentation
|
| 154 |
+
|
| 155 |
+
CUTLASS is described in the following documents and the accompanying
|
| 156 |
+
[Doxygen documentation](https://nvidia.github.io/cutlass).
|
| 157 |
+
|
| 158 |
+
- [Quick Start Guide](/media/docs/quickstart.md) - build and run CUTLASS
|
| 159 |
+
- [Functionality](/media/docs/functionality.md) - summarizes functionality available in CUTLASS
|
| 160 |
+
- [Efficient GEMM in CUDA](media/docs/efficient_gemm.md) - describes how GEMM kernels may be implemented efficiently in CUDA
|
| 161 |
+
- [CUTLASS 3.x Design](media/docs/cutlass_3x_design.md) - describes the CUTLASS 3.x design, its benefits, and how CuTe enables us to write much more composable components
|
| 162 |
+
- [GEMM API 3.x](media/docs/gemm_api_3x.md) - describes the CUTLASS 3.x GEMM model and C++ template concepts
|
| 163 |
+
- [GEMM API 2.x](media/docs/gemm_api.md) - describes the CUTLASS 2.x GEMM model and C++ template concepts
|
| 164 |
+
- [Implicit GEMM Convolution](media/docs/implicit_gemm_convolution.md) - describes 2-D and 3-D convolution in CUTLASS
|
| 165 |
+
- [Code Organization](media/docs/code_organization.md) - describes the organization and contents of the CUTLASS project
|
| 166 |
+
- [Terminology](media/docs/terminology.md) - describes terms used in the code
|
| 167 |
+
- [Programming Guidelines](media/docs/programming_guidelines.md) - guidelines for writing efficient modern CUDA C++
|
| 168 |
+
- [Fundamental types](media/docs/fundamental_types.md) - describes basic C++ classes used in CUTLASS to represent numeric quantities and arrays
|
| 169 |
+
- [Layouts](media/docs/layout.md) - describes layouts of matrices and tensors in memory
|
| 170 |
+
- [Tile Iterators](media/docs/tile_iterator_concept.md) - describes C++ concepts for iterating over tiles of matrices in memory
|
| 171 |
+
- [CUTLASS Profiler](media/docs/profiler.md) - command-line driven profiling application
|
| 172 |
+
- [CUTLASS Utilities](media/docs/utilities.md) - additional templates used to facilate rapid development
|
| 173 |
+
|
| 174 |
+
# Resources
|
| 175 |
+
We have also described the structure of an efficient GEMM in our talk at the
|
| 176 |
+
[GPU Technology Conference 2018](http://on-demand.gputechconf.com/gtc/2018/presentation/s8854-cutlass-software-primitives-for-dense-linear-algebra-at-all-levels-and-scales-within-cuda.pdf).
|
| 177 |
+
|
| 178 |
+
- [CUTLASS: Software Primitives for Dense Linear Algebra at All Levels and Scales within CUDA](https://www.nvidia.com/en-us/on-demand/session/gtcsiliconvalley2018-s8854/)
|
| 179 |
+
- [Developing CUDA Kernels to Push Tensor Cores to the Absolute Limit on NVIDIA A100](https://www.nvidia.com/en-us/on-demand/session/gtcsj20-s21745/)
|
| 180 |
+
- [Accelerating Convolution with Tensor Cores in CUTLASS](https://www.nvidia.com/en-us/on-demand/session/gtcspring21-s31883/)
|
| 181 |
+
- [Accelerating Backward Data Gradient by Increasing Tensor Core Utilization in CUTLASS](https://www.nvidia.com/en-us/on-demand/session/gtcspring22-s41996/)
|
| 182 |
+
- [CUTLASS: Python API, Enhancements, and NVIDIA Hopper](https://www.nvidia.com/en-us/on-demand/session/gtcfall22-a41131/)
|
| 183 |
+
|
| 184 |
+
# Building CUTLASS
|
| 185 |
+
|
| 186 |
+
CUTLASS is a header-only template library and does not need to be built to be used by other
|
| 187 |
+
projects. Client applications should target CUTLASS's `include/` directory in their include
|
| 188 |
+
paths.
|
| 189 |
+
|
| 190 |
+
CUTLASS unit tests, examples, and utilities can be build with CMake.
|
| 191 |
+
The minimum version of CMake is given in the [Quickstart guide](media/docs/quickstart.md).
|
| 192 |
+
Make sure the `CUDACXX` environment variable points to NVCC in the CUDA Toolkit installed
|
| 193 |
+
on your system.
|
| 194 |
+
|
| 195 |
+
```bash
|
| 196 |
+
$ export CUDACXX=${CUDA_INSTALL_PATH}/bin/nvcc
|
| 197 |
+
```
|
| 198 |
+
|
| 199 |
+
Create a build directory within the CUTLASS project, then run CMake. By default CUTLASS will build kernels
|
| 200 |
+
for CUDA architecture versions 5.0, 6.0, 6.1, 7.0, 7.5, 8.0, 8.6, 8.9, and 9.0.
|
| 201 |
+
To reduce compile time you can specify
|
| 202 |
+
the architectures to build CUTLASS for by changing the CMake configuration setting
|
| 203 |
+
`CUTLASS_NVCC_ARCHS`.
|
| 204 |
+
|
| 205 |
+
```bash
|
| 206 |
+
$ mkdir build && cd build
|
| 207 |
+
|
| 208 |
+
$ cmake .. -DCUTLASS_NVCC_ARCHS=80 # compiles for NVIDIA's Ampere Architecture
|
| 209 |
+
```
|
| 210 |
+
|
| 211 |
+
From the `build/` directory, compile and run the CUTLASS unit tests by building the target `test_unit` with make.
|
| 212 |
+
|
| 213 |
+
The unit tests are organized as several binaries mirroring the top-level namespaces of CUTLASS,
|
| 214 |
+
and they may be executed in parallel via make's `-j` command line argument.
|
| 215 |
+
|
| 216 |
+
```bash
|
| 217 |
+
$ make test_unit -j
|
| 218 |
+
...
|
| 219 |
+
...
|
| 220 |
+
...
|
| 221 |
+
[----------] Global test environment tear-down
|
| 222 |
+
[==========] 946 tests from 57 test cases ran. (10812 ms total)
|
| 223 |
+
[ PASSED ] 946 tests.
|
| 224 |
+
```
|
| 225 |
+
|
| 226 |
+
All tests should pass on supported platforms, though the exact number of tests may vary over time.
|
| 227 |
+
|
| 228 |
+
|
| 229 |
+
# Project Structure
|
| 230 |
+
|
| 231 |
+
CUTLASS is arranged as a header-only library along with Utilities, Tools, Examples, and unit tests.
|
| 232 |
+
[Doxygen documentation](https://nvidia.github.io/cutlass) provides a complete list of files, classes,
|
| 233 |
+
and template concepts defined in the CUTLASS project.
|
| 234 |
+
|
| 235 |
+
A detailed explanation of the source code organization may be found in the
|
| 236 |
+
[CUTLASS documentation](media/docs/code_organization.md), but several main components are summarized below.
|
| 237 |
+
|
| 238 |
+
## CUTLASS Template Library
|
| 239 |
+
|
| 240 |
+
```
|
| 241 |
+
include/ # client applications should target this directory in their build's include paths
|
| 242 |
+
|
| 243 |
+
cutlass/ # CUDA Templates for Linear Algebra Subroutines and Solvers - headers only
|
| 244 |
+
|
| 245 |
+
arch/ # direct exposure of architecture features (including instruction-level GEMMs)
|
| 246 |
+
|
| 247 |
+
conv/ # code specialized for convolution
|
| 248 |
+
|
| 249 |
+
epilogue/ # code specialized for the epilogue of gemm/convolution
|
| 250 |
+
|
| 251 |
+
gemm/ # code specialized for general matrix product computations
|
| 252 |
+
|
| 253 |
+
layout/ # layout definitions for matrices, tensors, and other mathematical objects in memory
|
| 254 |
+
|
| 255 |
+
platform/ # CUDA-capable Standard Library components
|
| 256 |
+
|
| 257 |
+
reduction/ # bandwidth-limited reduction kernels that do not fit the "gemm" model
|
| 258 |
+
|
| 259 |
+
thread/ # simt code that can be performed within a CUDA thread
|
| 260 |
+
|
| 261 |
+
transform/ # code specialized for layout, type, and domain transformations
|
| 262 |
+
|
| 263 |
+
* # core vocabulary types, containers, and basic numeric operations
|
| 264 |
+
|
| 265 |
+
cute/ # CuTe Layout, layout algebra, MMA/Copy atoms, tiled MMA/Copy
|
| 266 |
+
|
| 267 |
+
algorithm/ # Definitions of core operations such as copy, gemm, and operations on cute::tuples
|
| 268 |
+
|
| 269 |
+
arch/ # Bare bones PTX wrapper structs for copy and math instructions
|
| 270 |
+
|
| 271 |
+
atom/ # Meta-information either link to or built from arch/ operators
|
| 272 |
+
|
| 273 |
+
mma_atom.hpp # cute::Mma_Atom and cute::TiledMma
|
| 274 |
+
|
| 275 |
+
copy_atom.hpp # cute::Copy_Atom and cute::TiledCopy
|
| 276 |
+
|
| 277 |
+
*sm*.hpp # Arch specific meta-information for copy and math operations
|
| 278 |
+
|
| 279 |
+
* # Core library types such as Shape, Stride, Layout, Tensor, and associated operations
|
| 280 |
+
|
| 281 |
+
```
|
| 282 |
+
|
| 283 |
+
### CUTLASS SDK Examples
|
| 284 |
+
|
| 285 |
+
[CUTLASS SDK examples](/examples) apply CUTLASS templates to implement basic computations.
|
| 286 |
+
|
| 287 |
+
### Tools
|
| 288 |
+
|
| 289 |
+
```
|
| 290 |
+
tools/
|
| 291 |
+
library/ # CUTLASS Instance Library - contains instantiations of all supported CUTLASS templates
|
| 292 |
+
include/
|
| 293 |
+
cutlass/
|
| 294 |
+
library/
|
| 295 |
+
|
| 296 |
+
profiler/ # CUTLASS Profiler - command-line utility for executing operations in the
|
| 297 |
+
# CUTLASS Library
|
| 298 |
+
|
| 299 |
+
util/ # CUTLASS Utilities - contains numerous helper classes for
|
| 300 |
+
include/ # manging tensors in device memory, reference
|
| 301 |
+
cutlass/ # implementations for GEMM, random initialization
|
| 302 |
+
util/ # of tensors, and I/O.
|
| 303 |
+
```
|
| 304 |
+
|
| 305 |
+
### Test
|
| 306 |
+
|
| 307 |
+
The `test/unit/` directory consist of unit tests implemented with Google Test that demonstrate
|
| 308 |
+
basic usage of Core API components and complete tests of the CUTLASS GEMM computations.
|
| 309 |
+
|
| 310 |
+
Instructions for building and running the Unit tests are described in the [Quickstart guide](media/docs/quickstart.md).
|
| 311 |
+
|
| 312 |
+
# Performance Profiling
|
| 313 |
+
|
| 314 |
+
The `tools/profiler/` directory contains a command-line utility for launching each of the GEMM kernels.
|
| 315 |
+
It can be built as follows:
|
| 316 |
+
|
| 317 |
+
```bash
|
| 318 |
+
$ make cutlass_profiler -j16
|
| 319 |
+
```
|
| 320 |
+
## Building all GEMM and Convolution kernels (_long_ build times)
|
| 321 |
+
|
| 322 |
+
By default, only one tile size is instantiated for each data type, math instruction, and layout.
|
| 323 |
+
To instantiate all, set the following environment variable when running CMake from an empty `build/` directory.
|
| 324 |
+
Beware, this results in *tens of thousands* of kernels and long build times.
|
| 325 |
+
This would also result in a large binary size and on some platforms linker to fail on building the library.
|
| 326 |
+
Therefore, it's highly recommended to generate only a subset of kernels as demonstrated in the sub-section below.
|
| 327 |
+
```bash
|
| 328 |
+
$ cmake .. -DCUTLASS_NVCC_ARCHS=90a -DCUTLASS_LIBRARY_KERNELS=all
|
| 329 |
+
...
|
| 330 |
+
$ make cutlass_profiler -j16
|
| 331 |
+
```
|
| 332 |
+
|
| 333 |
+
## Building a subset of GEMM and Convolution kernels (_reduced_ build times)
|
| 334 |
+
|
| 335 |
+
To compile strictly one kernel or a small set of kernels, a comma-delimited list of kernel names with
|
| 336 |
+
wildcard characters may be used to reduce the set of kernels. The following examples show building exactly one
|
| 337 |
+
or a subset of kernels for NVIDIA Ampere and Turing architecture:
|
| 338 |
+
|
| 339 |
+
### Building a subset Tensor Core GEMM kernels
|
| 340 |
+
|
| 341 |
+
To compile a subset of Tensor Core GEMM kernels with FP32 accumulation and FP16 input targeting NVIDIA Ampere and Turing architecture,
|
| 342 |
+
use the below cmake command line:
|
| 343 |
+
```bash
|
| 344 |
+
$ cmake .. -DCUTLASS_NVCC_ARCHS='75;80' -DCUTLASS_LIBRARY_KERNELS=cutlass_tensorop_s*gemm_f16_*_nt_align8
|
| 345 |
+
...
|
| 346 |
+
$ make cutlass_profiler -j16
|
| 347 |
+
```
|
| 348 |
+
|
| 349 |
+
Example command line for profiling a subset of Tensor Core GEMM kernels is as follows:
|
| 350 |
+
```bash
|
| 351 |
+
./tools/profiler/cutlass_profiler --kernels=cutlass_tensorop_s*gemm_f16_*_nt_align8 --m=3456 --n=4096 --k=4096
|
| 352 |
+
|
| 353 |
+
...
|
| 354 |
+
=============================
|
| 355 |
+
Problem ID: 1
|
| 356 |
+
|
| 357 |
+
Provider: CUTLASS
|
| 358 |
+
OperationKind: gemm
|
| 359 |
+
Operation: cutlass_tensorop_s1688gemm_f16_256x128_32x2_nt_align8
|
| 360 |
+
|
| 361 |
+
Status: Success
|
| 362 |
+
Verification: ON
|
| 363 |
+
Disposition: Passed
|
| 364 |
+
|
| 365 |
+
reference_device: Passed
|
| 366 |
+
cuBLAS: Passed
|
| 367 |
+
|
| 368 |
+
Arguments: --gemm_kind=universal --m=3456 --n=4096 --k=4096 --A=f16:column --B=f16:row --C=f32:column --alpha=1 \
|
| 369 |
+
--beta=0 --split_k_slices=1 --batch_count=1 --op_class=tensorop --accum=f32 --cta_m=256 --cta_n=128 \
|
| 370 |
+
--cta_k=32 --stages=2 --warps_m=4 --warps_n=2 --warps_k=1 --inst_m=16 --inst_n=8 --inst_k=8 --min_cc=75 \
|
| 371 |
+
--max_cc=1024
|
| 372 |
+
|
| 373 |
+
Bytes: 118489088 bytes
|
| 374 |
+
FLOPs: 115992428544 flops
|
| 375 |
+
|
| 376 |
+
Runtime: 1.55948 ms
|
| 377 |
+
Memory: 70.7616 GiB/s
|
| 378 |
+
|
| 379 |
+
Math: 74378.8 GFLOP/s
|
| 380 |
+
|
| 381 |
+
|
| 382 |
+
|
| 383 |
+
=============================
|
| 384 |
+
...
|
| 385 |
+
```
|
| 386 |
+
|
| 387 |
+
### Building one CUDA Core GEMM kernel
|
| 388 |
+
|
| 389 |
+
To compile one SGEMM kernel targeting NVIDIA Ampere and Turing architecture, use the below cmake command line:
|
| 390 |
+
```bash
|
| 391 |
+
$ cmake .. -DCUTLASS_NVCC_ARCHS='75;80' -DCUTLASS_LIBRARY_KERNELS=cutlass_simt_sgemm_128x128_8x2_nn_align1
|
| 392 |
+
...
|
| 393 |
+
$ make cutlass_profiler -j16
|
| 394 |
+
```
|
| 395 |
+
|
| 396 |
+
Example command line for profiling single SGEMM CUDA kernel is as follows:
|
| 397 |
+
```bash
|
| 398 |
+
$ ./tools/profiler/cutlass_profiler --kernels=sgemm --m=3456 --n=4096 --k=4096
|
| 399 |
+
|
| 400 |
+
=============================
|
| 401 |
+
Problem ID: 1
|
| 402 |
+
|
| 403 |
+
Provider: CUTLASS
|
| 404 |
+
OperationKind: gemm
|
| 405 |
+
Operation: cutlass_simt_sgemm_128x128_8x2_nn_align1
|
| 406 |
+
|
| 407 |
+
Status: Success
|
| 408 |
+
Verification: ON
|
| 409 |
+
Disposition: Passed
|
| 410 |
+
|
| 411 |
+
cuBLAS: Passed
|
| 412 |
+
|
| 413 |
+
Arguments: --m=3456 --n=4096 --k=4096 --A=f32:column --B=f32:column --C=f32:column --alpha=1 --beta=0 --split_k_slices=1 \
|
| 414 |
+
--batch_count=1 --op_class=simt --accum=f32 --cta_m=128 --cta_n=128 --cta_k=8 --stages=2 --warps_m=4 \
|
| 415 |
+
--warps_n=2 --warps_k=1 --inst_m=1 --inst_n=1 --inst_k=1 --min_cc=50 --max_cc=1024
|
| 416 |
+
|
| 417 |
+
Bytes: 180355072 bytes
|
| 418 |
+
FLOPs: 115992428544 flops
|
| 419 |
+
|
| 420 |
+
Runtime: 6.73655 ms
|
| 421 |
+
Memory: 24.934 GiB/s
|
| 422 |
+
|
| 423 |
+
Math: 17218.4 GFLOP/s
|
| 424 |
+
|
| 425 |
+
=============================
|
| 426 |
+
```
|
| 427 |
+
|
| 428 |
+
### Building a subset of Tensor Core Convolution kernels
|
| 429 |
+
|
| 430 |
+
To compile a subset of Tensor core convolution kernels implementing forward propagation (fprop) with FP32 accumulation
|
| 431 |
+
and FP16 input targeting NVIDIA Ampere and Turing architecture, use the below cmake command line:
|
| 432 |
+
```bash
|
| 433 |
+
$ cmake .. -DCUTLASS_NVCC_ARCHS='75;80' -DCUTLASS_LIBRARY_KERNELS=cutlass_tensorop_s*fprop_optimized_f16
|
| 434 |
+
...
|
| 435 |
+
$ make cutlass_profiler -j16
|
| 436 |
+
```
|
| 437 |
+
|
| 438 |
+
Example command line for profiling a subset of Tensor Core convolution kernels is as follows:
|
| 439 |
+
|
| 440 |
+
```bash
|
| 441 |
+
$ ./tools/profiler/cutlass_profiler --kernels=cutlass_tensorop_s*fprop_optimized_f16 --n=8 --h=224 --w=224 --c=128 --k=128 --r=3 --s=3
|
| 442 |
+
|
| 443 |
+
...
|
| 444 |
+
=============================
|
| 445 |
+
Problem ID: 1
|
| 446 |
+
|
| 447 |
+
Provider: CUTLASS
|
| 448 |
+
OperationKind: conv2d
|
| 449 |
+
Operation: cutlass_tensorop_s16816fprop_optimized_f16_128x128_32x5_nhwc
|
| 450 |
+
|
| 451 |
+
Status: Success
|
| 452 |
+
Verification: ON
|
| 453 |
+
Disposition: Passed
|
| 454 |
+
|
| 455 |
+
reference_device: Passed
|
| 456 |
+
|
| 457 |
+
Arguments: --conv_kind=fprop --n=8 --h=224 --w=224 --c=128 --k=128 --r=3 --s=3 --p=224 --q=224 --pad_h=1 --pad_w=1 \
|
| 458 |
+
--stride_h=1 --stride_w=1 --dilation_h=1 --dilation_w=1 --Activation=f16:nhwc --Filter=f16:nhwc --Output=f32:nhwc \
|
| 459 |
+
--conv_mode=cross --iterator_algorithm=optimized --alpha=1 --beta=0 --split_k_mode=serial --split_k_slices=1 \
|
| 460 |
+
--eq_gemm_provider=none --op_class=tensorop --accum=f32 --cta_m=128 --cta_n=128 --cta_k=32 --stages=5 \
|
| 461 |
+
--warps_m=2 --warps_n=2 --warps_k=1 --inst_m=16 --inst_n=8 --inst_k=16 --min_cc=80 --max_cc=1024
|
| 462 |
+
|
| 463 |
+
Bytes: 1130659840 bytes
|
| 464 |
+
FLOPs: 118482796544 flops
|
| 465 |
+
|
| 466 |
+
Runtime: 0.711496 ms
|
| 467 |
+
Memory: 1479.99 GiB/s
|
| 468 |
+
|
| 469 |
+
Math: 166526 GFLOP/s
|
| 470 |
+
|
| 471 |
+
=============================
|
| 472 |
+
...
|
| 473 |
+
```
|
| 474 |
+
|
| 475 |
+
|
| 476 |
+
### Building one Convolution CUDA kernel
|
| 477 |
+
|
| 478 |
+
To compile and run one CUDA Core convolution kernel implementing forward propagation (fprop) with F32 accumulation
|
| 479 |
+
and FP32 input targeting NVIDIA Ampere and Turing architecture, use the below cmake command line:
|
| 480 |
+
```bash
|
| 481 |
+
$ cmake .. -DCUTLASS_NVCC_ARCHS='75;80' -DCUTLASS_LIBRARY_KERNELS=cutlass_simt_sfprop_optimized_128x128_8x2_nhwc
|
| 482 |
+
...
|
| 483 |
+
$ make cutlass_profiler -j16
|
| 484 |
+
```
|
| 485 |
+
|
| 486 |
+
Example command line for profiling one CUDA Core convolution kernel:
|
| 487 |
+
|
| 488 |
+
```bash
|
| 489 |
+
$ ./tools/profiler/cutlass_profiler --kernels=cutlass_simt_sfprop_optimized_128x128_8x2_nhwc --n=8 --h=224 --w=224 --c=128 --k=128 --r=3 --s=3
|
| 490 |
+
|
| 491 |
+
|
| 492 |
+
=============================
|
| 493 |
+
Problem ID: 1
|
| 494 |
+
|
| 495 |
+
Provider: CUTLASS
|
| 496 |
+
OperationKind: conv2d
|
| 497 |
+
Operation: cutlass_simt_sfprop_optimized_128x128_8x2_nhwc
|
| 498 |
+
|
| 499 |
+
Status: Success
|
| 500 |
+
Verification: ON
|
| 501 |
+
Disposition: Passed
|
| 502 |
+
|
| 503 |
+
reference_device: Passed
|
| 504 |
+
|
| 505 |
+
Arguments: --conv_kind=fprop --n=8 --h=224 --w=224 --c=128 --k=128 --r=3 --s=3 --p=224 --q=224 --pad_h=1 --pad_w=1 \
|
| 506 |
+
--stride_h=1 --stride_w=1 --dilation_h=1 --dilation_w=1 --Activation=f32:nhwc --Filter=f32:nhwc --Output=f32:nhwc \
|
| 507 |
+
--conv_mode=cross --iterator_algorithm=optimized --alpha=1 --beta=0 --split_k_mode=serial --split_k_slices=1 \
|
| 508 |
+
--eq_gemm_provider=none --op_class=simt --accum=f32 --cta_m=128 --cta_n=128 --cta_k=8 --stages=2 --warps_m=4 \
|
| 509 |
+
--warps_n=2 --warps_k=1 --inst_m=1 --inst_n=1 --inst_k=1 --min_cc=50 --max_cc=1024
|
| 510 |
+
|
| 511 |
+
Bytes: 2055798784 bytes
|
| 512 |
+
FLOPs: 118482796544 flops
|
| 513 |
+
|
| 514 |
+
Runtime: 7.34266 ms
|
| 515 |
+
Memory: 260.752 GiB/s
|
| 516 |
+
|
| 517 |
+
Math: 16136.2 GFLOP/s
|
| 518 |
+
|
| 519 |
+
|
| 520 |
+
=============================
|
| 521 |
+
|
| 522 |
+
```
|
| 523 |
+
|
| 524 |
+
## More Details on Compiling CUTLASS Kernels and CUTLASS Profiler
|
| 525 |
+
- Please follow the links for more CMake examples on selectively compiling CUTLASS kernels:
|
| 526 |
+
- [GEMM CMake Examples](media/docs/quickstart.md#gemm-cmake-examples)
|
| 527 |
+
- [Implicit GEMM convolution CMake Examples](media/docs/quickstart.md#convolution-cmake-examples)
|
| 528 |
+
- [Further details about the CUTLASS Profiler are described here.](media/docs/profiler.md)
|
| 529 |
+
|
| 530 |
+
|
| 531 |
+
# About
|
| 532 |
+
|
| 533 |
+
CUTLASS is released by NVIDIA Corporation as Open Source software under the
|
| 534 |
+
[3-clause "New" BSD license](LICENSE.txt).
|
| 535 |
+
|
| 536 |
+
# Contributors
|
| 537 |
+
|
| 538 |
+
The official list of CUTLASS developers and contributors is available here: [CONTRIBUTORS](CONTRIBUTORS.md).
|
| 539 |
+
|
| 540 |
+
# Copyright
|
| 541 |
+
|
| 542 |
+
Copyright (c) 2017 - 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 543 |
+
SPDX-License-Identifier: BSD-3-Clause
|
| 544 |
+
|
| 545 |
+
```
|
| 546 |
+
Redistribution and use in source and binary forms, with or without
|
| 547 |
+
modification, are permitted provided that the following conditions are met:
|
| 548 |
+
|
| 549 |
+
1. Redistributions of source code must retain the above copyright notice, this
|
| 550 |
+
list of conditions and the following disclaimer.
|
| 551 |
+
|
| 552 |
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
| 553 |
+
this list of conditions and the following disclaimer in the documentation
|
| 554 |
+
and/or other materials provided with the distribution.
|
| 555 |
+
|
| 556 |
+
3. Neither the name of the copyright holder nor the names of its
|
| 557 |
+
contributors may be used to endorse or promote products derived from
|
| 558 |
+
this software without specific prior written permission.
|
| 559 |
+
|
| 560 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 561 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 562 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 563 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 564 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 565 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 566 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 567 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 568 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 569 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 570 |
+
```
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/bin2hex.cmake
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A small utility function which generates a C-header from an input file
|
| 2 |
+
function(FILE_TO_C_STRING FILENAME VARIABLE_NAME OUTPUT_STRING ZERO_TERMINATED)
|
| 3 |
+
FILE(READ "${FILENAME}" HEX_INPUT HEX)
|
| 4 |
+
if (${ZERO_TERMINATED})
|
| 5 |
+
string(APPEND HEX_INPUT "00")
|
| 6 |
+
endif()
|
| 7 |
+
|
| 8 |
+
string(REGEX REPLACE "(....)" "\\1\n" HEX_OUTPUT ${HEX_INPUT})
|
| 9 |
+
string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," HEX_OUTPUT ${HEX_OUTPUT})
|
| 10 |
+
|
| 11 |
+
set(HEX_OUTPUT "static char const ${VARIABLE_NAME}[] = {\n ${HEX_OUTPUT}\n};\n")
|
| 12 |
+
|
| 13 |
+
set(${OUTPUT_STRING} "${HEX_OUTPUT}" PARENT_SCOPE)
|
| 14 |
+
endfunction()
|
| 15 |
+
|
| 16 |
+
# message("Create header file for ${FILE_IN}")
|
| 17 |
+
# message("Create header file for ${FILE_OUT}")
|
| 18 |
+
file_to_c_string(${FILE_IN} ${VARIABLE_NAME} OUTPUT_STRING ZERO_TERMINATED)
|
| 19 |
+
|
| 20 |
+
set(RESULT "#pragma once\n")
|
| 21 |
+
string(APPEND RESULT "namespace cutlass {\n")
|
| 22 |
+
string(APPEND RESULT "namespace nvrtc {\n")
|
| 23 |
+
string(APPEND RESULT "${OUTPUT_STRING}")
|
| 24 |
+
string(APPEND RESULT "} // namespace nvrtc\n")
|
| 25 |
+
string(APPEND RESULT "} // namespace cutlass\n")
|
| 26 |
+
file(WRITE "${FILE_OUT}" "${RESULT}")
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/CTestTestfile.configure.cmake
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated file
|
| 2 |
+
|
| 3 |
+
set(TEST_EXE_PATH @TEST_EXE_PATH@)
|
| 4 |
+
set(TEST_EXE_WORKING_DIRECTORY @TEST_EXE_WORKING_DIRECTORY@)
|
| 5 |
+
set(CUTLASS_USE_EXTENDED_ADD_TEST_FORMAT @TEST_USE_EXTENDED_FORMAT@)
|
| 6 |
+
|
| 7 |
+
if (DEFINED ENV{CUTLASS_TEST_EXECUTION_ENVIRONMENT})
|
| 8 |
+
set(_CUTLASS_TEST_EXECUTION_ENVIRONMENT $ENV{CUTLASS_TEST_EXECUTION_ENVIRONMENT})
|
| 9 |
+
else()
|
| 10 |
+
set(_CUTLASS_TEST_EXECUTION_ENVIRONMENT @CUTLASS_TEST_EXECUTION_ENVIRONMENT@)
|
| 11 |
+
endif()
|
| 12 |
+
|
| 13 |
+
@_INLINE_PER_TEST_CODE@
|
| 14 |
+
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/CTestTestfile.test.configure.cmake
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
if (CUTLASS_USE_EXTENDED_ADD_TEST_FORMAT)
|
| 2 |
+
# The longform/extended format allows generator expressions to be
|
| 3 |
+
# expanded property and is useful in contexts where the files need
|
| 4 |
+
# to be immediately included into being-processed cmake code.
|
| 5 |
+
add_test(NAME @TEST_NAME@ COMMAND ${_CUTLASS_TEST_EXECUTION_ENVIRONMENT} "${TEST_EXE_PATH}" @TEST_COMMAND_OPTIONS@)
|
| 6 |
+
else()
|
| 7 |
+
add_test(@TEST_NAME@ ${_CUTLASS_TEST_EXECUTION_ENVIRONMENT} "${TEST_EXE_PATH}" @TEST_COMMAND_OPTIONS@)
|
| 8 |
+
endif()
|
| 9 |
+
|
| 10 |
+
if (TEST_EXE_WORKING_DIRECTORY)
|
| 11 |
+
set_tests_properties(@TEST_NAME@ PROPERTIES WORKING_DIRECTORY "${TEST_EXE_WORKING_DIRECTORY}")
|
| 12 |
+
endif()
|
| 13 |
+
|
| 14 |
+
set_tests_properties(@TEST_NAME@ PROPERTIES DISABLED @__DISABLE_TESTS@)
|
| 15 |
+
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/NvidiaCutlassConfig.cmake
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
get_filename_component(NvidiaCutlass_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
| 2 |
+
|
| 3 |
+
include(CMakeFindDependencyMacro)
|
| 4 |
+
|
| 5 |
+
if(TARGET nvidia::cutlass::CUTLASS)
|
| 6 |
+
return()
|
| 7 |
+
endif()
|
| 8 |
+
|
| 9 |
+
include("${NvidiaCutlass_CMAKE_DIR}/NvidiaCutlassTargets.cmake")
|
| 10 |
+
|
| 11 |
+
# For backward compatibility with the old name
|
| 12 |
+
add_library(cutlass_lib ALIAS cutlass_library)
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/NvidiaCutlassPackageConfig.cmake
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set(CPACK_PACKAGE_NAME NvidiaCutlass)
|
| 2 |
+
set(CPACK_PACKAGE_VENDOR NVIDIA)
|
| 3 |
+
set(CPACK_PACKAGE_CONTACT info@nvidia.com)
|
| 4 |
+
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CUTLASS CUDA C++ Template Linear Algebra Library")
|
| 5 |
+
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
|
| 6 |
+
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
| 7 |
+
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
| 8 |
+
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
| 9 |
+
set(CPACK_VERBATIM_VARIABLES YES)
|
| 10 |
+
# set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_LIST_DIR}/Description.txt)
|
| 11 |
+
# set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_CURRENT_LIST_DIR}/Welcome.txt)
|
| 12 |
+
# set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_LIST_DIR}/License.txt)
|
| 13 |
+
# set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_LIST_DIR}/Readme.txt)
|
| 14 |
+
include(CPack)
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/googletest.cmake
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(FetchContent)
|
| 2 |
+
|
| 3 |
+
set(GOOGLETEST_DIR "" CACHE STRING "Location of local GoogleTest repo to build against")
|
| 4 |
+
|
| 5 |
+
if(GOOGLETEST_DIR)
|
| 6 |
+
set(FETCHCONTENT_SOURCE_DIR_GOOGLETEST ${GOOGLETEST_DIR} CACHE STRING "GoogleTest source directory override")
|
| 7 |
+
endif()
|
| 8 |
+
|
| 9 |
+
FetchContent_Declare(
|
| 10 |
+
googletest
|
| 11 |
+
GIT_REPOSITORY https://github.com/google/googletest.git
|
| 12 |
+
GIT_TAG v1.13.0
|
| 13 |
+
)
|
| 14 |
+
|
| 15 |
+
FetchContent_GetProperties(googletest)
|
| 16 |
+
|
| 17 |
+
if(NOT googletest_POPULATED)
|
| 18 |
+
FetchContent_Populate(googletest)
|
| 19 |
+
if (MSVC)
|
| 20 |
+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
| 21 |
+
endif()
|
| 22 |
+
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL)
|
| 23 |
+
endif()
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/nop.cu
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/***************************************************************************************************
|
| 2 |
+
* Copyright (c) 2017 - 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 3 |
+
* SPDX-License-Identifier: BSD-3-Clause
|
| 4 |
+
*
|
| 5 |
+
* Redistribution and use in source and binary forms, with or without
|
| 6 |
+
* modification, are permitted provided that the following conditions are met:
|
| 7 |
+
*
|
| 8 |
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
| 9 |
+
* list of conditions and the following disclaimer.
|
| 10 |
+
*
|
| 11 |
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
| 12 |
+
* this list of conditions and the following disclaimer in the documentation
|
| 13 |
+
* and/or other materials provided with the distribution.
|
| 14 |
+
*
|
| 15 |
+
* 3. Neither the name of the copyright holder nor the names of its
|
| 16 |
+
* contributors may be used to endorse or promote products derived from
|
| 17 |
+
* this software without specific prior written permission.
|
| 18 |
+
*
|
| 19 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 20 |
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 21 |
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 22 |
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 23 |
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 24 |
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 25 |
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 26 |
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 27 |
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 28 |
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 29 |
+
*
|
| 30 |
+
**************************************************************************************************/
|
| 31 |
+
/*! \file
|
| 32 |
+
\brief Basic CUDA file for testing compiler flags.
|
| 33 |
+
*/
|
| 34 |
+
|
| 35 |
+
__device__ int inner()
|
| 36 |
+
{
|
| 37 |
+
return -1;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
__global__ void test()
|
| 41 |
+
{
|
| 42 |
+
inner();
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
int main()
|
| 46 |
+
{
|
| 47 |
+
test<<<1,1>>>();
|
| 48 |
+
return 0;
|
| 49 |
+
}
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cmake/version.h.in
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include <cstdint>
|
| 2 |
+
#include <string>
|
| 3 |
+
|
| 4 |
+
#define CUTLASS_MAJOR @CUTLASS_VERSION_MAJOR@
|
| 5 |
+
#define CUTLASS_MINOR @CUTLASS_VERSION_MINOR@
|
| 6 |
+
#define CUTLASS_PATCH @CUTLASS_VERSION_PATCH@
|
| 7 |
+
#define CUTLASS_BUILD @CUTLASS_VERSION_BUILD@
|
| 8 |
+
#define CUTLASS_VERSION ((CUTLASS_MAJOR)*100 + (CUTLASS_MINOR)*10 + CUTLASS_PATCH)
|
| 9 |
+
|
| 10 |
+
namespace cutlass {
|
| 11 |
+
|
| 12 |
+
inline uint32_t getVersion() {
|
| 13 |
+
return CUTLASS_VERSION;
|
| 14 |
+
}
|
| 15 |
+
inline uint32_t getVersionMajor() {
|
| 16 |
+
return CUTLASS_MAJOR;
|
| 17 |
+
}
|
| 18 |
+
inline uint32_t getVersionMinor() {
|
| 19 |
+
return CUTLASS_MINOR;
|
| 20 |
+
}
|
| 21 |
+
inline uint32_t getVersionPatch() {
|
| 22 |
+
return CUTLASS_PATCH;
|
| 23 |
+
}
|
| 24 |
+
inline uint32_t getVersionBuild() {
|
| 25 |
+
return CUTLASS_BUILD + 0;
|
| 26 |
+
}
|
| 27 |
+
inline std::string getVersionString() {
|
| 28 |
+
std::string version = "@CUTLASS_VERSION@";
|
| 29 |
+
if (getVersionBuild()) {
|
| 30 |
+
version += "." + std::to_string(getVersionBuild());
|
| 31 |
+
}
|
| 32 |
+
return version;
|
| 33 |
+
}
|
| 34 |
+
inline std::string getGitRevision() {
|
| 35 |
+
return "@CUTLASS_REVISION@";
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
} // namespace cutlass
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cuBLAS.cmake
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2017 - 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
#
|
| 4 |
+
# Redistribution and use in source and binary forms, with or without
|
| 5 |
+
# modification, are permitted provided that the following conditions are met:
|
| 6 |
+
#
|
| 7 |
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
| 8 |
+
# list of conditions and the following disclaimer.
|
| 9 |
+
#
|
| 10 |
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
| 11 |
+
# this list of conditions and the following disclaimer in the documentation
|
| 12 |
+
# and/or other materials provided with the distribution.
|
| 13 |
+
#
|
| 14 |
+
# 3. Neither the name of the copyright holder nor the names of its
|
| 15 |
+
# contributors may be used to endorse or promote products derived from
|
| 16 |
+
# this software without specific prior written permission.
|
| 17 |
+
#
|
| 18 |
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 19 |
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 20 |
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 21 |
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 22 |
+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 23 |
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 24 |
+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 25 |
+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 26 |
+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 27 |
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 28 |
+
|
| 29 |
+
message(STATUS "Configuring cublas ...")
|
| 30 |
+
|
| 31 |
+
if((DEFINED CUTLASS_ENABLE_CUBLAS AND NOT CUTLASS_ENABLE_CUBLAS) OR
|
| 32 |
+
(DEFINED CUBLAS_ENABLED AND NOT CUBLAS_ENABLED))
|
| 33 |
+
|
| 34 |
+
# Don't add cuBLAS if it's defined and false, assume it's not found.
|
| 35 |
+
|
| 36 |
+
set(CUBLAS_FOUND OFF)
|
| 37 |
+
message(STATUS "cuBLAS Disabled.")
|
| 38 |
+
|
| 39 |
+
elseif(NOT TARGET cublas)
|
| 40 |
+
|
| 41 |
+
find_path(
|
| 42 |
+
_CUBLAS_INCLUDE_DIR
|
| 43 |
+
NAMES cublas_v2.h
|
| 44 |
+
HINTS
|
| 45 |
+
${CUBLAS_INCLUDE_PATH}
|
| 46 |
+
ENV CUBLAS_INCLUDE_PATH
|
| 47 |
+
${CUBLAS_PATH}
|
| 48 |
+
ENV CUBLAS_PATH
|
| 49 |
+
${CUDA_TOOLKIT_ROOT_DIR}
|
| 50 |
+
PATH_SUFFIXES
|
| 51 |
+
include
|
| 52 |
+
)
|
| 53 |
+
|
| 54 |
+
find_library(
|
| 55 |
+
_CUBLAS_LIBRARY
|
| 56 |
+
NAMES cublas
|
| 57 |
+
HINTS
|
| 58 |
+
${CUBLAS_LIBRARY_PATH}
|
| 59 |
+
ENV CUBLAS_LIBRARY_PATH
|
| 60 |
+
${_CUBLAS_INCLUDE_DIR}/..
|
| 61 |
+
${CUBLAS_PATH}
|
| 62 |
+
ENV CUBLAS_PATH
|
| 63 |
+
${CUDA_TOOLKIT_ROOT_DIR}
|
| 64 |
+
PATH_SUFFIXES
|
| 65 |
+
lib64
|
| 66 |
+
lib/x64
|
| 67 |
+
lib
|
| 68 |
+
)
|
| 69 |
+
|
| 70 |
+
if(_CUBLAS_INCLUDE_DIR AND _CUBLAS_LIBRARY)
|
| 71 |
+
|
| 72 |
+
message(STATUS "cuBLAS: ${_CUBLAS_LIBRARY}")
|
| 73 |
+
message(STATUS "cuBLAS: ${_CUBLAS_INCLUDE_DIR}")
|
| 74 |
+
|
| 75 |
+
set(CUBLAS_FOUND ON CACHE INTERNAL "cublas Library Found")
|
| 76 |
+
set(CUBLAS_LIBRARY ${_CUBLAS_LIBRARY})
|
| 77 |
+
set(CUBLAS_INCLUDE_DIR ${_CUBLAS_INCLUDE_DIR})
|
| 78 |
+
|
| 79 |
+
else()
|
| 80 |
+
|
| 81 |
+
message(STATUS "cublas not found.")
|
| 82 |
+
set(CUBLAS_FOUND OFF CACHE INTERNAL "cublas Library Found")
|
| 83 |
+
|
| 84 |
+
endif()
|
| 85 |
+
|
| 86 |
+
endif()
|
| 87 |
+
|
| 88 |
+
set(CUTLASS_ENABLE_CUBLAS ${CUBLAS_FOUND} CACHE BOOL "Enable CUTLASS to build with cuBLAS library.")
|
| 89 |
+
|
| 90 |
+
if(CUTLASS_ENABLE_CUBLAS AND NOT CUBLAS_FOUND)
|
| 91 |
+
message(FATAL_ERROR "CUTLASS_ENABLE_CUBLAS enabled but cuBLAS library could not be found.")
|
| 92 |
+
endif()
|
| 93 |
+
|
| 94 |
+
if(CUTLASS_ENABLE_CUBLAS AND NOT TARGET cublas)
|
| 95 |
+
|
| 96 |
+
if(WIN32)
|
| 97 |
+
add_library(cublas STATIC IMPORTED GLOBAL)
|
| 98 |
+
else()
|
| 99 |
+
add_library(cublas SHARED IMPORTED GLOBAL)
|
| 100 |
+
endif()
|
| 101 |
+
|
| 102 |
+
add_library(nvidia::cublas ALIAS cublas)
|
| 103 |
+
|
| 104 |
+
set_property(
|
| 105 |
+
TARGET cublas
|
| 106 |
+
PROPERTY IMPORTED_LOCATION
|
| 107 |
+
${CUBLAS_LIBRARY})
|
| 108 |
+
|
| 109 |
+
target_include_directories(
|
| 110 |
+
cublas
|
| 111 |
+
INTERFACE
|
| 112 |
+
$<INSTALL_INTERFACE:include>
|
| 113 |
+
$<BUILD_INTERFACE:${CUBLAS_INCLUDE_DIR}>)
|
| 114 |
+
|
| 115 |
+
find_library(
|
| 116 |
+
_CUBLASLT_LIBRARY
|
| 117 |
+
NAMES cublasLt
|
| 118 |
+
HINTS
|
| 119 |
+
${CUBLAS_LIBRARY_PATH}
|
| 120 |
+
ENV CUBLAS_LIBRARY_PATH
|
| 121 |
+
${_CUBLAS_INCLUDE_DIR}/..
|
| 122 |
+
${CUBLAS_PATH}
|
| 123 |
+
ENV CUBLAS_PATH
|
| 124 |
+
${CUDA_TOOLKIT_ROOT_DIR}
|
| 125 |
+
PATH_SUFFIXES
|
| 126 |
+
lib64
|
| 127 |
+
lib/x64
|
| 128 |
+
lib
|
| 129 |
+
)
|
| 130 |
+
|
| 131 |
+
if(_CUBLASLT_LIBRARY AND NOT TARGET cublasLt)
|
| 132 |
+
|
| 133 |
+
if(WIN32)
|
| 134 |
+
add_library(cublasLt STATIC IMPORTED GLOBAL)
|
| 135 |
+
else()
|
| 136 |
+
add_library(cublasLt SHARED IMPORTED GLOBAL)
|
| 137 |
+
endif()
|
| 138 |
+
|
| 139 |
+
set_property(
|
| 140 |
+
TARGET cublasLt
|
| 141 |
+
PROPERTY IMPORTED_LOCATION
|
| 142 |
+
${_CUBLASLT_LIBRARY})
|
| 143 |
+
|
| 144 |
+
add_library(nvidia::cublasLt ALIAS cublasLt)
|
| 145 |
+
|
| 146 |
+
target_link_libraries(cublas INTERFACE cublasLt)
|
| 147 |
+
|
| 148 |
+
endif()
|
| 149 |
+
|
| 150 |
+
endif()
|
| 151 |
+
|
| 152 |
+
message(STATUS "Configuring cuBLAS ... done.")
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/cuDNN.cmake
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2017 - 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
#
|
| 4 |
+
# Redistribution and use in source and binary forms, with or without
|
| 5 |
+
# modification, are permitted provided that the following conditions are met:
|
| 6 |
+
#
|
| 7 |
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
| 8 |
+
# list of conditions and the following disclaimer.
|
| 9 |
+
#
|
| 10 |
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
| 11 |
+
# this list of conditions and the following disclaimer in the documentation
|
| 12 |
+
# and/or other materials provided with the distribution.
|
| 13 |
+
#
|
| 14 |
+
# 3. Neither the name of the copyright holder nor the names of its
|
| 15 |
+
# contributors may be used to endorse or promote products derived from
|
| 16 |
+
# this software without specific prior written permission.
|
| 17 |
+
#
|
| 18 |
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 19 |
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 20 |
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 21 |
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 22 |
+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 23 |
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 24 |
+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 25 |
+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 26 |
+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 27 |
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 28 |
+
|
| 29 |
+
if(DEFINED CUDNN_ENABLED)
|
| 30 |
+
set(CUTLASS_ENABLE_CUDNN ${CUDNN_ENABLED} CACHE BOOL "Enable CUTLASS to build with cuDNN library.")
|
| 31 |
+
endif()
|
| 32 |
+
|
| 33 |
+
if(DEFINED CUTLASS_ENABLE_CUDNN AND NOT CUTLASS_ENABLE_CUDNN)
|
| 34 |
+
return()
|
| 35 |
+
endif()
|
| 36 |
+
|
| 37 |
+
message(STATUS "Configuring cuDNN ...")
|
| 38 |
+
|
| 39 |
+
find_path(
|
| 40 |
+
_CUDNN_INCLUDE_DIR cudnn.h
|
| 41 |
+
PATHS
|
| 42 |
+
${CUDA_TOOLKIT_ROOT_DIR}/include
|
| 43 |
+
$ENV{CUDNN_PATH}/include
|
| 44 |
+
$ENV{CUDA_PATH}/include
|
| 45 |
+
${CUDNN_PATH}/include
|
| 46 |
+
/usr/include)
|
| 47 |
+
|
| 48 |
+
find_library(
|
| 49 |
+
_CUDNN_LIBRARY cudnn
|
| 50 |
+
HINTS
|
| 51 |
+
${CUDA_TOOLKIT_ROOT_DIR}/lib64
|
| 52 |
+
${CUDA_TOOLKIT_ROOT_DIR}/lib/x64
|
| 53 |
+
${CUDA_TOOLKIT_ROOT_DIR}/lib
|
| 54 |
+
$ENV{CUDNN_PATH}/lib64
|
| 55 |
+
$ENV{CUDNN_PATH}/lib/x64
|
| 56 |
+
$ENV{CUDNN_PATH}/lib
|
| 57 |
+
$ENV{CUDA_PATH}/lib64
|
| 58 |
+
$ENV{CUDA_PATH}/lib/x64
|
| 59 |
+
$ENV{CUDA_PATH}/lib
|
| 60 |
+
${CUDNN_PATH}/lib64
|
| 61 |
+
${CUDNN_PATH}/lib/x64
|
| 62 |
+
${CUDNN_PATH}/lib
|
| 63 |
+
/usr/lib/x86_64-linux-gnu
|
| 64 |
+
/usr/lib)
|
| 65 |
+
|
| 66 |
+
if(_CUDNN_INCLUDE_DIR AND _CUDNN_LIBRARY)
|
| 67 |
+
|
| 68 |
+
message(STATUS "cuDNN: ${_CUDNN_LIBRARY}")
|
| 69 |
+
message(STATUS "cuDNN: ${_CUDNN_INCLUDE_DIR}")
|
| 70 |
+
|
| 71 |
+
set(CUDNN_FOUND ON CACHE INTERNAL "cuDNN Library Found")
|
| 72 |
+
|
| 73 |
+
else()
|
| 74 |
+
|
| 75 |
+
message(STATUS "cuDNN not found.")
|
| 76 |
+
set(CUDNN_FOUND OFF CACHE INTERNAL "cuDNN Library Found")
|
| 77 |
+
|
| 78 |
+
endif()
|
| 79 |
+
|
| 80 |
+
set(CUTLASS_ENABLE_CUDNN ${CUDNN_FOUND} CACHE BOOL "Enable CUTLASS to build with cuDNN library.")
|
| 81 |
+
|
| 82 |
+
if (CUTLASS_ENABLE_CUDNN AND NOT TARGET cudnn)
|
| 83 |
+
|
| 84 |
+
set(CUDNN_INCLUDE_DIR ${_CUDNN_INCLUDE_DIR})
|
| 85 |
+
set(CUDNN_LIBRARY ${_CUDNN_LIBRARY})
|
| 86 |
+
|
| 87 |
+
if(WIN32)
|
| 88 |
+
add_library(cudnn STATIC IMPORTED GLOBAL)
|
| 89 |
+
else()
|
| 90 |
+
add_library(cudnn SHARED IMPORTED GLOBAL)
|
| 91 |
+
endif()
|
| 92 |
+
|
| 93 |
+
add_library(nvidia::cudnn ALIAS cudnn)
|
| 94 |
+
|
| 95 |
+
set_property(
|
| 96 |
+
TARGET cudnn
|
| 97 |
+
PROPERTY IMPORTED_LOCATION
|
| 98 |
+
${CUDNN_LIBRARY})
|
| 99 |
+
|
| 100 |
+
target_include_directories(
|
| 101 |
+
cudnn
|
| 102 |
+
INTERFACE
|
| 103 |
+
$<INSTALL_INTERFACE:include>
|
| 104 |
+
$<BUILD_INTERFACE:${CUDNN_INCLUDE_DIR}>)
|
| 105 |
+
|
| 106 |
+
endif()
|
| 107 |
+
|
| 108 |
+
if(CUTLASS_ENABLE_CUDNN AND NOT CUDNN_FOUND)
|
| 109 |
+
message(FATAL_ERROR "CUTLASS_ENABLE_CUDNN enabled but cuDNN library could not be found.")
|
| 110 |
+
endif()
|
| 111 |
+
|
| 112 |
+
message(STATUS "Configuring cuDNN ... done.")
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/docs/arch_2mma__sm50_8h_source.html
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| 2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
| 3 |
+
<head>
|
| 4 |
+
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
| 5 |
+
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
| 6 |
+
<meta name="generator" content="Doxygen 1.8.11"/>
|
| 7 |
+
<title>CUTLASS: mma_sm50.h Source File</title>
|
| 8 |
+
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
| 9 |
+
<script type="text/javascript" src="jquery.js"></script>
|
| 10 |
+
<script type="text/javascript" src="dynsections.js"></script>
|
| 11 |
+
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
| 12 |
+
<script type="text/javascript" src="search/searchdata.js"></script>
|
| 13 |
+
<script type="text/javascript" src="search/search.js"></script>
|
| 14 |
+
<script type="text/javascript">
|
| 15 |
+
$(document).ready(function() { init_search(); });
|
| 16 |
+
</script>
|
| 17 |
+
<script type="text/x-mathjax-config">
|
| 18 |
+
MathJax.Hub.Config({
|
| 19 |
+
extensions: ["tex2jax.js"],
|
| 20 |
+
jax: ["input/TeX","output/HTML-CSS"],
|
| 21 |
+
});
|
| 22 |
+
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
|
| 23 |
+
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
| 24 |
+
</head>
|
| 25 |
+
<body>
|
| 26 |
+
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
| 27 |
+
<div id="titlearea">
|
| 28 |
+
<table cellspacing="0" cellpadding="0">
|
| 29 |
+
<tbody>
|
| 30 |
+
<tr style="height: 56px;">
|
| 31 |
+
<td id="projectlogo"><img alt="Logo" src="cutlass-logo-small.png"/></td>
|
| 32 |
+
<td id="projectalign" style="padding-left: 0.5em;">
|
| 33 |
+
<div id="projectname">CUTLASS
|
| 34 |
+
</div>
|
| 35 |
+
<div id="projectbrief">CUDA Templates for Linear Algebra Subroutines and Solvers</div>
|
| 36 |
+
</td>
|
| 37 |
+
</tr>
|
| 38 |
+
</tbody>
|
| 39 |
+
</table>
|
| 40 |
+
</div>
|
| 41 |
+
<!-- end header part -->
|
| 42 |
+
<!-- Generated by Doxygen 1.8.11 -->
|
| 43 |
+
<script type="text/javascript">
|
| 44 |
+
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
| 45 |
+
</script>
|
| 46 |
+
<div id="navrow1" class="tabs">
|
| 47 |
+
<ul class="tablist">
|
| 48 |
+
<li><a href="index.html"><span>Main Page</span></a></li>
|
| 49 |
+
<li><a href="modules.html"><span>Modules</span></a></li>
|
| 50 |
+
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
| 51 |
+
<li><a href="annotated.html"><span>Classes</span></a></li>
|
| 52 |
+
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
| 53 |
+
<li>
|
| 54 |
+
<div id="MSearchBox" class="MSearchBoxInactive">
|
| 55 |
+
<span class="left">
|
| 56 |
+
<img id="MSearchSelect" src="search/mag_sel.png"
|
| 57 |
+
onmouseover="return searchBox.OnSearchSelectShow()"
|
| 58 |
+
onmouseout="return searchBox.OnSearchSelectHide()"
|
| 59 |
+
alt=""/>
|
| 60 |
+
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
| 61 |
+
onfocus="searchBox.OnSearchFieldFocus(true)"
|
| 62 |
+
onblur="searchBox.OnSearchFieldFocus(false)"
|
| 63 |
+
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
| 64 |
+
</span><span class="right">
|
| 65 |
+
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
| 66 |
+
</span>
|
| 67 |
+
</div>
|
| 68 |
+
</li>
|
| 69 |
+
</ul>
|
| 70 |
+
</div>
|
| 71 |
+
<div id="navrow2" class="tabs2">
|
| 72 |
+
<ul class="tablist">
|
| 73 |
+
<li><a href="files.html"><span>File List</span></a></li>
|
| 74 |
+
<li><a href="globals.html"><span>File Members</span></a></li>
|
| 75 |
+
</ul>
|
| 76 |
+
</div>
|
| 77 |
+
<!-- window showing the filter options -->
|
| 78 |
+
<div id="MSearchSelectWindow"
|
| 79 |
+
onmouseover="return searchBox.OnSearchSelectShow()"
|
| 80 |
+
onmouseout="return searchBox.OnSearchSelectHide()"
|
| 81 |
+
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
| 82 |
+
</div>
|
| 83 |
+
|
| 84 |
+
<!-- iframe showing the search results (closed by default) -->
|
| 85 |
+
<div id="MSearchResultsWindow">
|
| 86 |
+
<iframe src="javascript:void(0)" frameborder="0"
|
| 87 |
+
name="MSearchResults" id="MSearchResults">
|
| 88 |
+
</iframe>
|
| 89 |
+
</div>
|
| 90 |
+
|
| 91 |
+
<div id="nav-path" class="navpath">
|
| 92 |
+
<ul>
|
| 93 |
+
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_6baf2bb612a2f0daa69af3101ede80a1.html">cutlass</a></li><li class="navelem"><a class="el" href="dir_048c1df36ab9c2efbb0733edba6291c9.html">arch</a></li> </ul>
|
| 94 |
+
</div>
|
| 95 |
+
</div><!-- top -->
|
| 96 |
+
<div class="header">
|
| 97 |
+
<div class="headertitle">
|
| 98 |
+
<div class="title">arch/mma_sm50.h</div> </div>
|
| 99 |
+
</div><!--header-->
|
| 100 |
+
<div class="contents">
|
| 101 |
+
<a href="arch_2mma__sm50_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/***************************************************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Redistribution and use in source and binary forms, with or without modification, are permitted</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * provided that the following conditions are met:</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * * Redistributions of source code must retain the above copyright notice, this list of</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * conditions and the following disclaimer.</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * * Redistributions in binary form must reproduce the above copyright notice, this list of</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * conditions and the following disclaimer in the documentation and/or other materials</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * provided with the distribution.</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * * Neither the name of the NVIDIA CORPORATION nor the names of its contributors may be used</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * to endorse or promote products derived from this software without specific prior written</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * permission.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> *</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * STRICT LIABILITY, OR TOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> *</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> **************************************************************************************************/</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="arch_2mma_8h.html">cutlass/arch/mma.h</a>"</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include "<a class="code" href="complex_8h.html">cutlass/complex.h</a>"</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include "<a class="code" href="layout_2matrix_8h.html">cutlass/layout/matrix.h</a>"</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include "<a class="code" href="include_2cutlass_2gemm_2gemm_8h.html">cutlass/gemm/gemm.h</a>"</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">namespace </span><a class="code" href="namespacecutlass.html">cutlass</a> {</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">namespace </span>arch {</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">template</span> <</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keyword">typename</span> LayoutA,</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keyword">typename</span> LayoutB,</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keyword">typename</span> LayoutC</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> ></div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01float_004bb3fd76ca2af7b3210676fa9644d95b.html"> 53</a></span> <span class="keyword">struct </span><a class="code" href="structcutlass_1_1arch_1_1Mma.html">Mma</a><gemm::GemmShape<1, 1, 1>, 1, float, LayoutA, float, LayoutB, float, LayoutC, OpMultiplyAdd> {</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01float_004bb3fd76ca2af7b3210676fa9644d95b.html#a782d6a8a48b3ab0ff1eead092d348aef"> 55</a></span>  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">Shape</a> = <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">gemm::GemmShape<1, 1, 1></a>;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="code" href="cutlass_8h.html#a28c2443a142676d3d71effdae1a986b1">CUTLASS_HOST_DEVICE</a></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01float_004bb3fd76ca2af7b3210676fa9644d95b.html#a47e6d9cb8a24ae8246272985741f7f0d"> 58</a></span>  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01float_004bb3fd76ca2af7b3210676fa9644d95b.html#a47e6d9cb8a24ae8246272985741f7f0d">operator()</a>(</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  Array<float, 1> &d,</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  Array<float, 1> <span class="keyword">const</span> &a,</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  Array<float, 1> <span class="keyword">const</span> &b,</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  Array<float, 1> <span class="keyword">const</span> &c</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  ) {</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  d[0] = a[0] * b[0] + c[0];</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  }</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> };</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">template</span> <</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keyword">typename</span> LayoutA,</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keyword">typename</span> LayoutB,</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keyword">typename</span> LayoutC</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> ></div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01double_0aa57e6a2e6b5da37d10688bf99419a23.html"> 79</a></span> <span class="keyword">struct </span><a class="code" href="structcutlass_1_1arch_1_1Mma.html">Mma</a><gemm::GemmShape<1, 1, 1>, 1, double, LayoutA, double, LayoutB, double, LayoutC, OpMultiplyAdd> {</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01double_0aa57e6a2e6b5da37d10688bf99419a23.html#a25202ab89ec2def5b1bd9eec2cf6033c"> 81</a></span>  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">Shape</a> = <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">gemm::GemmShape<1, 1, 1></a>;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="cutlass_8h.html#a28c2443a142676d3d71effdae1a986b1">CUTLASS_HOST_DEVICE</a></div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01double_0aa57e6a2e6b5da37d10688bf99419a23.html#acc4d8ede06a490f3fbfec8e3dd75b0b1"> 84</a></span>  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01double_0aa57e6a2e6b5da37d10688bf99419a23.html#acc4d8ede06a490f3fbfec8e3dd75b0b1">operator()</a>(</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  Array<double, 1> &d,</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  Array<double, 1> <span class="keyword">const</span> &a,</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  Array<double, 1> <span class="keyword">const</span> &b,</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  Array<double, 1> <span class="keyword">const</span> &c</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  ) {</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  d[0] = a[0] * b[0] + c[0];</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  }</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> };</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="keyword">template</span> <</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keyword">typename</span> LayoutA,</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keyword">typename</span> LayoutB,</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keyword">typename</span> LayoutC</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> ></div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01int_00_00b2dff9ce8caad9aff5bc6a355539161.html"> 106</a></span> <span class="keyword">struct </span><a class="code" href="structcutlass_1_1arch_1_1Mma.html">Mma</a><gemm::GemmShape<1, 1, 1>, 1, int, LayoutA, int, LayoutB, int, LayoutC, OpMultiplyAdd> {</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div><div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01int_00_00b2dff9ce8caad9aff5bc6a355539161.html#ae7c95bf7586a4586b9fbb10d002219e1"> 108</a></span>  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">Shape</a> = <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">gemm::GemmShape<1, 1, 1></a>;</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span> </div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <a class="code" href="cutlass_8h.html#a28c2443a142676d3d71effdae1a986b1">CUTLASS_HOST_DEVICE</a></div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01int_00_00b2dff9ce8caad9aff5bc6a355539161.html#a147ecaa2af6851b26a17eb8f8d95f9d0"> 111</a></span>  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01int_00_00b2dff9ce8caad9aff5bc6a355539161.html#a147ecaa2af6851b26a17eb8f8d95f9d0">operator()</a>(</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  Array<int, 1> &d,</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  Array<int, 1> <span class="keyword">const</span> &a,</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  Array<int, 1> <span class="keyword">const</span> &b,</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  Array<int, 1> <span class="keyword">const</span> &c</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  ) {</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> </div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  d[0] = a[0] * b[0] + c[0];</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  }</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> };</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> </div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="keyword">template</span> <</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keyword">typename</span> LayoutA,</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keyword">typename</span> LayoutB,</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keyword">typename</span> LayoutC</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> ></div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_76f9d24016e1b4167b16f4d7628c9546.html"> 133</a></span> <span class="keyword">struct </span><a class="code" href="structcutlass_1_1arch_1_1Mma.html">Mma</a><</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  gemm::GemmShape<1, 1, 1>,</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  1,</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><float>, </div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  LayoutA, </div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><float>, </div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  LayoutB, </div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><float>, </div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  LayoutC, </div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  OpMultiplyAdd> {</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span> </div><div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_76f9d24016e1b4167b16f4d7628c9546.html#ac9f5444de09469501776e60a42bd0c34"> 144</a></span>  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">Shape</a> = <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">gemm::GemmShape<1, 1, 1></a>;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span> </div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <a class="code" href="cutlass_8h.html#a28c2443a142676d3d71effdae1a986b1">CUTLASS_HOST_DEVICE</a></div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_76f9d24016e1b4167b16f4d7628c9546.html#ae914107ff2d7b1524cc9f8c70237a8f9"> 147</a></span>  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_76f9d24016e1b4167b16f4d7628c9546.html#ae914107ff2d7b1524cc9f8c70237a8f9">operator()</a>(</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<float></a>, 1> &d,</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<float></a>, 1> <span class="keyword">const</span> &a,</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<float></a>, 1> <span class="keyword">const</span> &b,</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<float></a>, 1> <span class="keyword">const</span> &c</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  ) {</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span> </div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  d[0].real() = a[0].real() * b[0].real() + c[0].real();</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  d[0].imag() = a[0].imag() * b[0].real() + c[0].imag();</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  d[0].real() = -a[0].imag() * b[0].imag() + d[0].real();</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  d[0].imag() = a[0].real() * b[0].imag() + d[0].imag();</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  }</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span> };</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> </div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> </div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span> <span class="keyword">template</span> <</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keyword">typename</span> LayoutA,</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="keyword">typename</span> LayoutB,</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keyword">typename</span> LayoutC</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span> ></div><div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_f1c9d2ee842455cd0c5b71d56108d468.html"> 172</a></span> <span class="keyword">struct </span><a class="code" href="structcutlass_1_1arch_1_1Mma.html">Mma</a><</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  gemm::GemmShape<1, 1, 1>,</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  1,</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><float>, </div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  LayoutA, </div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  float, </div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  LayoutB, </div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><float>, </div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  LayoutC, </div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  OpMultiplyAdd> {</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div><div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_f1c9d2ee842455cd0c5b71d56108d468.html#a2dc603e5f509e53cb54b7091c2f15c9c"> 183</a></span>  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">Shape</a> = <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">gemm::GemmShape<1, 1, 1></a>;</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> </div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <a class="code" href="cutlass_8h.html#a28c2443a142676d3d71effdae1a986b1">CUTLASS_HOST_DEVICE</a></div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_f1c9d2ee842455cd0c5b71d56108d468.html#a3b69fa99a09158d9be274651f6b74980"> 186</a></span>  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_f1c9d2ee842455cd0c5b71d56108d468.html#a3b69fa99a09158d9be274651f6b74980">operator()</a>(</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<float></a>, 1> &d,</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<float></a>, 1> <span class="keyword">const</span> &a,</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  Array<float, 1> <span class="keyword">const</span> &b,</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<float></a>, 1> <span class="keyword">const</span> &c</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  ) {</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span> </div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  d[0].real() = a[0].real() * b[0] + c[0].real();</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  d[0].imag() = a[0].imag() * b[0] + c[0].imag();</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  }</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span> };</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> </div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span> </div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span> <span class="keyword">template</span> <</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keyword">typename</span> LayoutA,</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keyword">typename</span> LayoutB,</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keyword">typename</span> LayoutC</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span> ></div><div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01float_00e3e12e263df6506b8cf06c3f4d478b8e.html"> 209</a></span> <span class="keyword">struct </span><a class="code" href="structcutlass_1_1arch_1_1Mma.html">Mma</a><</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  gemm::GemmShape<1, 1, 1>,</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  1,</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  float, </div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  LayoutA, </div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><float>, </div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  LayoutB, </div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><float>, </div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  LayoutC, </div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  OpMultiplyAdd> {</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span> </div><div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01float_00e3e12e263df6506b8cf06c3f4d478b8e.html#a583b65a74d484e480f400c2190486951"> 220</a></span>  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">Shape</a> = <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">gemm::GemmShape<1, 1, 1></a>;</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span> </div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <a class="code" href="cutlass_8h.html#a28c2443a142676d3d71effdae1a986b1">CUTLASS_HOST_DEVICE</a></div><div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01float_00e3e12e263df6506b8cf06c3f4d478b8e.html#a175c9e89f95837838e533687f4c4078d"> 223</a></span>  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01float_00e3e12e263df6506b8cf06c3f4d478b8e.html#a175c9e89f95837838e533687f4c4078d">operator()</a>(</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<float></a>, 1> &d,</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  Array<float, 1> <span class="keyword">const</span> &a,</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<float></a>, 1> <span class="keyword">const</span> &b,</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<float></a>, 1> <span class="keyword">const</span> &c</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  ) {</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span> </div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  d[0].real() = a[0] * b[0].real() + c[0].real();</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  d[0].imag() = a[0] * b[0].imag() + d[0].imag();</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  }</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span> };</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span> </div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span> </div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span> <span class="keyword">template</span> <</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <span class="keyword">typename</span> LayoutA,</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <span class="keyword">typename</span> LayoutB,</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <span class="keyword">typename</span> LayoutC</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span> ></div><div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_30fa42e1ad201df010637cd22fc070a1.html"> 246</a></span> <span class="keyword">struct </span><a class="code" href="structcutlass_1_1arch_1_1Mma.html">Mma</a><</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  gemm::GemmShape<1, 1, 1>,</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  1,</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><double>, </div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  LayoutA, </div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><double>, </div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  LayoutB, </div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><double>, </div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  LayoutC, </div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  OpMultiplyAdd> {</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span> </div><div class="line"><a name="l00257"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_30fa42e1ad201df010637cd22fc070a1.html#a62044fc37f00508f89509ed76b86cb5a"> 257</a></span>  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">Shape</a> = <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">gemm::GemmShape<1, 1, 1></a>;</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span> </div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <a class="code" href="cutlass_8h.html#a28c2443a142676d3d71effdae1a986b1">CUTLASS_HOST_DEVICE</a></div><div class="line"><a name="l00260"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_30fa42e1ad201df010637cd22fc070a1.html#af37b41df0067e4c878baafc8d71574d9"> 260</a></span>  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_30fa42e1ad201df010637cd22fc070a1.html#af37b41df0067e4c878baafc8d71574d9">operator()</a>(</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<double></a>, 1> &d,</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<double></a>, 1> <span class="keyword">const</span> &a,</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<double></a>, 1> <span class="keyword">const</span> &b,</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<double></a>, 1> <span class="keyword">const</span> &c</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  ) {</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span> </div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  d[0].real() = a[0].real() * b[0].real() + c[0].real();</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  d[0].imag() = a[0].imag() * b[0].real() + c[0].imag();</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  d[0].real() = -a[0].imag() * b[0].imag() + d[0].real();</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  d[0].imag() = a[0].real() * b[0].imag() + d[0].imag();</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  }</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span> };</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span> </div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span> <span class="keyword">template</span> <</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keyword">typename</span> LayoutA,</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keyword">typename</span> LayoutB,</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keyword">typename</span> LayoutC</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span> ></div><div class="line"><a name="l00283"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_48b3a43bc03fff93a111ac01abe7e40d.html"> 283</a></span> <span class="keyword">struct </span><a class="code" href="structcutlass_1_1arch_1_1Mma.html">Mma</a><</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  gemm::GemmShape<1, 1, 1>,</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  1,</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><double>, </div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  LayoutA, </div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  double, </div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  LayoutB, </div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><double>, </div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  LayoutC, </div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  OpMultiplyAdd> {</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span> </div><div class="line"><a name="l00294"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_48b3a43bc03fff93a111ac01abe7e40d.html#ac696059d2fc99e1840452127ec04edb9"> 294</a></span>  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">Shape</a> = <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">gemm::GemmShape<1, 1, 1></a>;</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span> </div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <a class="code" href="cutlass_8h.html#a28c2443a142676d3d71effdae1a986b1">CUTLASS_HOST_DEVICE</a></div><div class="line"><a name="l00297"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_48b3a43bc03fff93a111ac01abe7e40d.html#a8f8180dcd03dad7b45d73f09e87c060b"> 297</a></span>  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_48b3a43bc03fff93a111ac01abe7e40d.html#a8f8180dcd03dad7b45d73f09e87c060b">operator()</a>(</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<double></a>, 1> &d,</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<double></a>, 1> <span class="keyword">const</span> &a,</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  Array<double, 1> <span class="keyword">const</span> &b,</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<double></a>, 1> <span class="keyword">const</span> &c</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  ) {</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span> </div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  d[0].real() = a[0].real() * b[0] + c[0].real();</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  d[0].imag() = a[0].imag() * b[0] + c[0].imag();</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  }</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span> };</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span> </div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span> <span class="keyword">template</span> <</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <span class="keyword">typename</span> LayoutA,</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <span class="keyword">typename</span> LayoutB,</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="keyword">typename</span> LayoutC</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span> ></div><div class="line"><a name="l00318"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01double_070b94670e040ed5855e5b42d5ca8a443.html"> 318</a></span> <span class="keyword">struct </span><a class="code" href="structcutlass_1_1arch_1_1Mma.html">Mma</a><</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  gemm::GemmShape<1, 1, 1>,</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  1,</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  double, </div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  LayoutA, </div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><double>, </div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  LayoutB, </div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  <a class="code" href="classcutlass_1_1complex.html">complex</a><double>, </div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  LayoutC, </div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  OpMultiplyAdd> {</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span> </div><div class="line"><a name="l00329"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01double_070b94670e040ed5855e5b42d5ca8a443.html#aa8429d8cbbafbbf17f40cdbf040ba1c1"> 329</a></span>  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">Shape</a> = <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">gemm::GemmShape<1, 1, 1></a>;</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span> </div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  <a class="code" href="cutlass_8h.html#a28c2443a142676d3d71effdae1a986b1">CUTLASS_HOST_DEVICE</a></div><div class="line"><a name="l00332"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01double_070b94670e040ed5855e5b42d5ca8a443.html#a672562083112f8463a9791113482c4e9"> 332</a></span>  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01double_070b94670e040ed5855e5b42d5ca8a443.html#a672562083112f8463a9791113482c4e9">operator()</a>(</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<double></a>, 1> &d,</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  Array<double, 1> <span class="keyword">const</span> &a,</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<double></a>, 1> <span class="keyword">const</span> &b,</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  Array<<a class="code" href="classcutlass_1_1complex.html">complex<double></a>, 1> <span class="keyword">const</span> &c</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  ) {</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span> </div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  d[0].real() = a[0] * b[0].real() + c[0].real();</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  d[0].imag() = a[0] * b[0].imag() + d[0].imag();</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  }</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span> };</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span> </div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span> </div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span> <span class="keyword">template</span> <</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <span class="keyword">typename</span> LayoutA,</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="keyword">typename</span> LayoutB,</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <span class="keyword">typename</span> LayoutC</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span> ></div><div class="line"><a name="l00355"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01half__t_4f30ee91f7bb3844ff7579c68d078818.html"> 355</a></span> <span class="keyword">struct </span><a class="code" href="structcutlass_1_1arch_1_1Mma.html">Mma</a><gemm::GemmShape<1, 1, 1>, 1, <a class="code" href="structcutlass_1_1half__t.html">half_t</a>, LayoutA, <a class="code" href="structcutlass_1_1half__t.html">half_t</a>, LayoutB, float, LayoutC, OpMultiplyAdd> {</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span> </div><div class="line"><a name="l00357"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01half__t_4f30ee91f7bb3844ff7579c68d078818.html#a76e594a71cad06065389402617dd714b"> 357</a></span>  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">Shape</a> = <a class="code" href="structcutlass_1_1gemm_1_1GemmShape.html">gemm::GemmShape<1, 1, 1></a>;</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span> </div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <a class="code" href="cutlass_8h.html#a28c2443a142676d3d71effdae1a986b1">CUTLASS_HOST_DEVICE</a></div><div class="line"><a name="l00360"></a><span class="lineno"><a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01half__t_4f30ee91f7bb3844ff7579c68d078818.html#aa1e0584011f1b74dc6a541693d6a2dc2"> 360</a></span>  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01half__t_4f30ee91f7bb3844ff7579c68d078818.html#aa1e0584011f1b74dc6a541693d6a2dc2">operator()</a>(</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  Array<float, 1> &d,</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  Array<half_t, 1> <span class="keyword">const</span> &a,</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  Array<half_t, 1> <span class="keyword">const</span> &b,</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  Array<float, 1> <span class="keyword">const</span> &c</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  ) {</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  d[0] = float(a[0]) * float(b[0]) + c[0];</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  }</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span> };</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span> </div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span> </div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span> }</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span> }</div><div class="ttc" id="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01int_00_00b2dff9ce8caad9aff5bc6a355539161_html_a147ecaa2af6851b26a17eb8f8d95f9d0"><div class="ttname"><a href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01int_00_00b2dff9ce8caad9aff5bc6a355539161.html#a147ecaa2af6851b26a17eb8f8d95f9d0">cutlass::arch::Mma< gemm::GemmShape< 1, 1, 1 >, 1, int, LayoutA, int, LayoutB, int, LayoutC, OpMultiplyAdd >::operator()</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE void operator()(Array< int, 1 > &d, Array< int, 1 > const &a, Array< int, 1 > const &b, Array< int, 1 > const &c)</div><div class="ttdef"><b>Definition:</b> arch/mma_sm50.h:111</div></div>
|
| 102 |
+
<div class="ttc" id="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_48b3a43bc03fff93a111ac01abe7e40d_html_a8f8180dcd03dad7b45d73f09e87c060b"><div class="ttname"><a href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_48b3a43bc03fff93a111ac01abe7e40d.html#a8f8180dcd03dad7b45d73f09e87c060b">cutlass::arch::Mma< gemm::GemmShape< 1, 1, 1 >, 1, complex< double >, LayoutA, double, LayoutB, complex< double >, LayoutC, OpMultiplyAdd >::operator()</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE void operator()(Array< complex< double >, 1 > &d, Array< complex< double >, 1 > const &a, Array< double, 1 > const &b, Array< complex< double >, 1 > const &c)</div><div class="ttdef"><b>Definition:</b> arch/mma_sm50.h:297</div></div>
|
| 103 |
+
<div class="ttc" id="namespacecutlass_html"><div class="ttname"><a href="namespacecutlass.html">cutlass</a></div><div class="ttdef"><b>Definition:</b> aligned_buffer.h:35</div></div>
|
| 104 |
+
<div class="ttc" id="complex_8h_html"><div class="ttname"><a href="complex_8h.html">complex.h</a></div></div>
|
| 105 |
+
<div class="ttc" id="structcutlass_1_1half__t_html"><div class="ttname"><a href="structcutlass_1_1half__t.html">cutlass::half_t</a></div><div class="ttdoc">IEEE half-precision floating-point type. </div><div class="ttdef"><b>Definition:</b> half.h:126</div></div>
|
| 106 |
+
<div class="ttc" id="include_2cutlass_2gemm_2gemm_8h_html"><div class="ttname"><a href="include_2cutlass_2gemm_2gemm_8h.html">gemm.h</a></div><div class="ttdoc">Defines common types used for all GEMM-like operators. </div></div>
|
| 107 |
+
<div class="ttc" id="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_76f9d24016e1b4167b16f4d7628c9546_html_ae914107ff2d7b1524cc9f8c70237a8f9"><div class="ttname"><a href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_76f9d24016e1b4167b16f4d7628c9546.html#ae914107ff2d7b1524cc9f8c70237a8f9">cutlass::arch::Mma< gemm::GemmShape< 1, 1, 1 >, 1, complex< float >, LayoutA, complex< float >, LayoutB, complex< float >, LayoutC, OpMultiplyAdd >::operator()</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE void operator()(Array< complex< float >, 1 > &d, Array< complex< float >, 1 > const &a, Array< complex< float >, 1 > const &b, Array< complex< float >, 1 > const &c)</div><div class="ttdef"><b>Definition:</b> arch/mma_sm50.h:147</div></div>
|
| 108 |
+
<div class="ttc" id="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_30fa42e1ad201df010637cd22fc070a1_html_af37b41df0067e4c878baafc8d71574d9"><div class="ttname"><a href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_30fa42e1ad201df010637cd22fc070a1.html#af37b41df0067e4c878baafc8d71574d9">cutlass::arch::Mma< gemm::GemmShape< 1, 1, 1 >, 1, complex< double >, LayoutA, complex< double >, LayoutB, complex< double >, LayoutC, OpMultiplyAdd >::operator()</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE void operator()(Array< complex< double >, 1 > &d, Array< complex< double >, 1 > const &a, Array< complex< double >, 1 > const &b, Array< complex< double >, 1 > const &c)</div><div class="ttdef"><b>Definition:</b> arch/mma_sm50.h:260</div></div>
|
| 109 |
+
<div class="ttc" id="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01half__t_4f30ee91f7bb3844ff7579c68d078818_html_aa1e0584011f1b74dc6a541693d6a2dc2"><div class="ttname"><a href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01half__t_4f30ee91f7bb3844ff7579c68d078818.html#aa1e0584011f1b74dc6a541693d6a2dc2">cutlass::arch::Mma< gemm::GemmShape< 1, 1, 1 >, 1, half_t, LayoutA, half_t, LayoutB, float, LayoutC, OpMultiplyAdd >::operator()</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE void operator()(Array< float, 1 > &d, Array< half_t, 1 > const &a, Array< half_t, 1 > const &b, Array< float, 1 > const &c)</div><div class="ttdef"><b>Definition:</b> arch/mma_sm50.h:360</div></div>
|
| 110 |
+
<div class="ttc" id="arch_2mma_8h_html"><div class="ttname"><a href="arch_2mma_8h.html">mma.h</a></div><div class="ttdoc">Templates exposing architecture support for multiply-add operations. </div></div>
|
| 111 |
+
<div class="ttc" id="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_f1c9d2ee842455cd0c5b71d56108d468_html_a3b69fa99a09158d9be274651f6b74980"><div class="ttname"><a href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01complex_f1c9d2ee842455cd0c5b71d56108d468.html#a3b69fa99a09158d9be274651f6b74980">cutlass::arch::Mma< gemm::GemmShape< 1, 1, 1 >, 1, complex< float >, LayoutA, float, LayoutB, complex< float >, LayoutC, OpMultiplyAdd >::operator()</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE void operator()(Array< complex< float >, 1 > &d, Array< complex< float >, 1 > const &a, Array< float, 1 > const &b, Array< complex< float >, 1 > const &c)</div><div class="ttdef"><b>Definition:</b> arch/mma_sm50.h:186</div></div>
|
| 112 |
+
<div class="ttc" id="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01float_004bb3fd76ca2af7b3210676fa9644d95b_html_a47e6d9cb8a24ae8246272985741f7f0d"><div class="ttname"><a href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01float_004bb3fd76ca2af7b3210676fa9644d95b.html#a47e6d9cb8a24ae8246272985741f7f0d">cutlass::arch::Mma< gemm::GemmShape< 1, 1, 1 >, 1, float, LayoutA, float, LayoutB, float, LayoutC, OpMultiplyAdd >::operator()</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE void operator()(Array< float, 1 > &d, Array< float, 1 > const &a, Array< float, 1 > const &b, Array< float, 1 > const &c)</div><div class="ttdef"><b>Definition:</b> arch/mma_sm50.h:58</div></div>
|
| 113 |
+
<div class="ttc" id="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01float_00e3e12e263df6506b8cf06c3f4d478b8e_html_a175c9e89f95837838e533687f4c4078d"><div class="ttname"><a href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01float_00e3e12e263df6506b8cf06c3f4d478b8e.html#a175c9e89f95837838e533687f4c4078d">cutlass::arch::Mma< gemm::GemmShape< 1, 1, 1 >, 1, float, LayoutA, complex< float >, LayoutB, complex< float >, LayoutC, OpMultiplyAdd >::operator()</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE void operator()(Array< complex< float >, 1 > &d, Array< float, 1 > const &a, Array< complex< float >, 1 > const &b, Array< complex< float >, 1 > const &c)</div><div class="ttdef"><b>Definition:</b> arch/mma_sm50.h:223</div></div>
|
| 114 |
+
<div class="ttc" id="cutlass_8h_html_a28c2443a142676d3d71effdae1a986b1"><div class="ttname"><a href="cutlass_8h.html#a28c2443a142676d3d71effdae1a986b1">CUTLASS_HOST_DEVICE</a></div><div class="ttdeci">#define CUTLASS_HOST_DEVICE</div><div class="ttdef"><b>Definition:</b> cutlass.h:89</div></div>
|
| 115 |
+
<div class="ttc" id="structcutlass_1_1gemm_1_1GemmShape_html"><div class="ttname"><a href="structcutlass_1_1gemm_1_1GemmShape.html">cutlass::gemm::GemmShape</a></div><div class="ttdoc">Shape of a matrix multiply-add operation. </div><div class="ttdef"><b>Definition:</b> include/cutlass/gemm/gemm.h:57</div></div>
|
| 116 |
+
<div class="ttc" id="classcutlass_1_1complex_html"><div class="ttname"><a href="classcutlass_1_1complex.html">cutlass::complex</a></div><div class="ttdef"><b>Definition:</b> complex.h:92</div></div>
|
| 117 |
+
<div class="ttc" id="layout_2matrix_8h_html"><div class="ttname"><a href="layout_2matrix_8h.html">matrix.h</a></div><div class="ttdoc">Defines layout functions used by TensorRef and derived classes. </div></div>
|
| 118 |
+
<div class="ttc" id="structcutlass_1_1arch_1_1Mma_html"><div class="ttname"><a href="structcutlass_1_1arch_1_1Mma.html">cutlass::arch::Mma</a></div><div class="ttdoc">Matrix multiply-add operation. </div><div class="ttdef"><b>Definition:</b> arch/mma.h:92</div></div>
|
| 119 |
+
<div class="ttc" id="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01double_070b94670e040ed5855e5b42d5ca8a443_html_a672562083112f8463a9791113482c4e9"><div class="ttname"><a href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01double_070b94670e040ed5855e5b42d5ca8a443.html#a672562083112f8463a9791113482c4e9">cutlass::arch::Mma< gemm::GemmShape< 1, 1, 1 >, 1, double, LayoutA, complex< double >, LayoutB, complex< double >, LayoutC, OpMultiplyAdd >::operator()</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE void operator()(Array< complex< double >, 1 > &d, Array< double, 1 > const &a, Array< complex< double >, 1 > const &b, Array< complex< double >, 1 > const &c)</div><div class="ttdef"><b>Definition:</b> arch/mma_sm50.h:332</div></div>
|
| 120 |
+
<div class="ttc" id="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01double_0aa57e6a2e6b5da37d10688bf99419a23_html_acc4d8ede06a490f3fbfec8e3dd75b0b1"><div class="ttname"><a href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_011_00_011_00_011_01_4_00_011_00_01double_0aa57e6a2e6b5da37d10688bf99419a23.html#acc4d8ede06a490f3fbfec8e3dd75b0b1">cutlass::arch::Mma< gemm::GemmShape< 1, 1, 1 >, 1, double, LayoutA, double, LayoutB, double, LayoutC, OpMultiplyAdd >::operator()</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE void operator()(Array< double, 1 > &d, Array< double, 1 > const &a, Array< double, 1 > const &b, Array< double, 1 > const &c)</div><div class="ttdef"><b>Definition:</b> arch/mma_sm50.h:84</div></div>
|
| 121 |
+
</div><!-- fragment --></div><!-- contents -->
|
| 122 |
+
<!-- start footer part -->
|
| 123 |
+
<hr class="footer"/><address class="footer"><small>
|
| 124 |
+
Generated by  <a href="http://www.doxygen.org/index.html">
|
| 125 |
+
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
| 126 |
+
</a> 1.8.11
|
| 127 |
+
</small></address>
|
| 128 |
+
</body>
|
| 129 |
+
</html>
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/docs/arch_2mma__sm60_8h__dep__incl.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
ba69b14e3936946092854211499ae9fa
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/docs/array_8h_source.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/docs/array__subbyte_8h__dep__incl.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
7c0288c037b6ea169ec7a3aa1015a4d4
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/docs/array__subbyte_8h__incl.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
36310516438810c2a8ba31a7816cd1de
|
venv/lib/python3.10/site-packages/bitblas/3rdparty/cutlass/docs/classcutlass_1_1AlignedArray__inherit__graph.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
5bfb78a70e6c0c4f1dba98d2cf455a30
|