diff --git a/.cache/pip/http-v2/3/2/2/c/b/322cb2d2fa9c18feda7312c66e98b038ca0bb7446362e84c4a580aa3 b/.cache/pip/http-v2/3/2/2/c/b/322cb2d2fa9c18feda7312c66e98b038ca0bb7446362e84c4a580aa3 new file mode 100644 index 0000000000000000000000000000000000000000..abf958c655cf2c5ce1bfe082ee9d1085facf882b Binary files /dev/null and b/.cache/pip/http-v2/3/2/2/c/b/322cb2d2fa9c18feda7312c66e98b038ca0bb7446362e84c4a580aa3 differ diff --git a/.cache/pip/http-v2/3/3/9/7/4/33974f84394d9a943f68359da08431dab4af9f86c33962982ea21b5f b/.cache/pip/http-v2/3/3/9/7/4/33974f84394d9a943f68359da08431dab4af9f86c33962982ea21b5f new file mode 100644 index 0000000000000000000000000000000000000000..89e60c2a5d0f2fdd304f6aa2f91c70d937a9d7ca Binary files /dev/null and b/.cache/pip/http-v2/3/3/9/7/4/33974f84394d9a943f68359da08431dab4af9f86c33962982ea21b5f differ diff --git a/.cache/pip/http-v2/5/1/f/2/8/51f28abf47f08a699c067b6b49e9b61d7ffb241813480943666c7bcf b/.cache/pip/http-v2/5/1/f/2/8/51f28abf47f08a699c067b6b49e9b61d7ffb241813480943666c7bcf new file mode 100644 index 0000000000000000000000000000000000000000..340ce95bc307102182972213dab4e9d83a6c2bb3 Binary files /dev/null and b/.cache/pip/http-v2/5/1/f/2/8/51f28abf47f08a699c067b6b49e9b61d7ffb241813480943666c7bcf differ diff --git a/.cache/pip/http-v2/5/1/f/2/8/51f28abf47f08a699c067b6b49e9b61d7ffb241813480943666c7bcf.body b/.cache/pip/http-v2/5/1/f/2/8/51f28abf47f08a699c067b6b49e9b61d7ffb241813480943666c7bcf.body new file mode 100644 index 0000000000000000000000000000000000000000..03c48b95c51d989c1aa40bc6aa2db9f9846ee5a2 --- /dev/null +++ b/.cache/pip/http-v2/5/1/f/2/8/51f28abf47f08a699c067b6b49e9b61d7ffb241813480943666c7bcf.body @@ -0,0 +1,87 @@ +Metadata-Version: 2.1 +Name: pyarrow +Version: 17.0.0 +Summary: Python library for Apache Arrow +Maintainer-email: Apache Arrow Developers +License: Apache Software License +Project-URL: Homepage, https://arrow.apache.org/ +Project-URL: Documentation, https://arrow.apache.org/docs/python +Project-URL: Repository, https://github.com/apache/arrow +Project-URL: Issues, https://github.com/apache/arrow/issues +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Requires-Python: >=3.8 +Description-Content-Type: text/markdown +License-File: ../LICENSE.txt +License-File: ../NOTICE.txt +Requires-Dist: numpy >=1.16.6 +Provides-Extra: test +Requires-Dist: pytest ; extra == 'test' +Requires-Dist: hypothesis ; extra == 'test' +Requires-Dist: cffi ; extra == 'test' +Requires-Dist: pytz ; extra == 'test' +Requires-Dist: pandas ; extra == 'test' + + + +## Python library for Apache Arrow + +[![pypi](https://img.shields.io/pypi/v/pyarrow.svg)](https://pypi.org/project/pyarrow/) [![conda-forge](https://img.shields.io/conda/vn/conda-forge/pyarrow.svg)](https://anaconda.org/conda-forge/pyarrow) + +This library provides a Python API for functionality provided by the Arrow C++ +libraries, along with tools for Arrow integration and interoperability with +pandas, NumPy, and other software in the Python ecosystem. + +## Installing + +Across platforms, you can install a recent version of pyarrow with the conda +package manager: + +```shell +conda install pyarrow -c conda-forge +``` + +On Linux, macOS, and Windows, you can also install binary wheels from PyPI with +pip: + +```shell +pip install pyarrow +``` + +If you encounter any issues importing the pip wheels on Windows, you may need +to install the [Visual C++ Redistributable for Visual Studio 2015][6]. + +## Development + +See [Python Development][2] in the documentation subproject. + +### Building the documentation + +See [documentation build instructions][1] in the documentation subproject. + +[1]: https://github.com/apache/arrow/blob/main/docs/source/developers/documentation.rst +[2]: https://github.com/apache/arrow/blob/main/docs/source/developers/python.rst +[3]: https://github.com/pandas-dev/pandas +[5]: https://arrow.apache.org/docs/latest/python/benchmarks.html +[6]: https://www.microsoft.com/en-us/download/details.aspx?id=48145 diff --git a/.cache/pip/http-v2/5/2/4/e/a/524eaa378c5eeff9b07f34d936ce7bc411da078278be84566970502d b/.cache/pip/http-v2/5/2/4/e/a/524eaa378c5eeff9b07f34d936ce7bc411da078278be84566970502d new file mode 100644 index 0000000000000000000000000000000000000000..7b6ef9dd5ca455db3820b127deeaf649f5202a73 Binary files /dev/null and b/.cache/pip/http-v2/5/2/4/e/a/524eaa378c5eeff9b07f34d936ce7bc411da078278be84566970502d differ diff --git a/.cache/pip/http-v2/5/4/c/b/6/54cb669eb9a885793334a25ee9e0fbe07bec87103a57cea1aaa59e27 b/.cache/pip/http-v2/5/4/c/b/6/54cb669eb9a885793334a25ee9e0fbe07bec87103a57cea1aaa59e27 new file mode 100644 index 0000000000000000000000000000000000000000..c7bdf0813bf6ea91f623e6ca76d2eeb491416a74 Binary files /dev/null and b/.cache/pip/http-v2/5/4/c/b/6/54cb669eb9a885793334a25ee9e0fbe07bec87103a57cea1aaa59e27 differ diff --git a/.cache/pip/http-v2/5/6/f/9/d/56f9d9bd534016b34d1660bb01a66bb1704ef80e0f133b683da4f133 b/.cache/pip/http-v2/5/6/f/9/d/56f9d9bd534016b34d1660bb01a66bb1704ef80e0f133b683da4f133 new file mode 100644 index 0000000000000000000000000000000000000000..99add3d64a2baccf676f5a98c619492327f37a3b Binary files /dev/null and b/.cache/pip/http-v2/5/6/f/9/d/56f9d9bd534016b34d1660bb01a66bb1704ef80e0f133b683da4f133 differ diff --git a/.cache/pip/http-v2/5/a/2/6/c/5a26cc45879e115d5aabd5f6ef627d6747bf3160bca5548379570c58.body b/.cache/pip/http-v2/5/a/2/6/c/5a26cc45879e115d5aabd5f6ef627d6747bf3160bca5548379570c58.body new file mode 100644 index 0000000000000000000000000000000000000000..61856e09aba0a57fec026d709c8f076c156c1818 --- /dev/null +++ b/.cache/pip/http-v2/5/a/2/6/c/5a26cc45879e115d5aabd5f6ef627d6747bf3160bca5548379570c58.body @@ -0,0 +1,113 @@ +Metadata-Version: 2.1 +Name: smmap +Version: 5.0.1 +Summary: A pure Python implementation of a sliding window memory map manager +Home-page: https://github.com/gitpython-developers/smmap +Author: Sebastian Thiel +Author-email: byronimo@gmail.com +License: BSD +Platform: any +Classifier: Development Status :: 5 - Production/Stable +Classifier: Environment :: Console +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: BSD License +Classifier: Operating System :: OS Independent +Classifier: Operating System :: POSIX +Classifier: Operating System :: Microsoft :: Windows +Classifier: Operating System :: MacOS :: MacOS X +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3 :: Only +Requires-Python: >=3.7 +Description-Content-Type: text/markdown +License-File: LICENSE + +## Motivation + +When reading from many possibly large files in a fashion similar to random access, it is usually the fastest and most efficient to use memory maps. + +Although memory maps have many advantages, they represent a very limited system resource as every map uses one file descriptor, whose amount is limited per process. On 32 bit systems, the amount of memory you can have mapped at a time is naturally limited to theoretical 4GB of memory, which may not be enough for some applications. + + +## Limitations + +* **System resources (file-handles) are likely to be leaked!** This is due to the library authors reliance on a deterministic `__del__()` destructor. +* The memory access is read-only by design. + + +## Overview + +![Python package](https://github.com/gitpython-developers/smmap/workflows/Python%20package/badge.svg) + +Smmap wraps an interface around mmap and tracks the mapped files as well as the amount of clients who use it. If the system runs out of resources, or if a memory limit is reached, it will automatically unload unused maps to allow continued operation. + +To allow processing large files even on 32 bit systems, it allows only portions of the file to be mapped. Once the user reads beyond the mapped region, smmap will automatically map the next required region, unloading unused regions using a LRU algorithm. + +Although the library can be used most efficiently with its native interface, a Buffer implementation is provided to hide these details behind a simple string-like interface. + +For performance critical 64 bit applications, a simplified version of memory mapping is provided which always maps the whole file, but still provides the benefit of unloading unused mappings on demand. + + + +## Prerequisites + +* Python 3.7+ +* OSX, Windows or Linux + +The package was tested on all of the previously mentioned configurations. + +## Installing smmap + +[![Documentation Status](https://readthedocs.org/projects/smmap/badge/?version=latest)](https://readthedocs.org/projects/smmap/?badge=latest) + +Its easiest to install smmap using the [pip](http://www.pip-installer.org/en/latest) program: + +```bash +$ pip install smmap +``` + +As the command will install smmap in your respective python distribution, you will most likely need root permissions to authorize the required changes. + +If you have downloaded the source archive, the package can be installed by running the `setup.py` script: + +```bash +$ python setup.py install +``` + +It is advised to have a look at the **Usage Guide** for a brief introduction on the different database implementations. + + + +## Homepage and Links + +The project is home on github at https://github.com/gitpython-developers/smmap . + +The latest source can be cloned from github as well: + +* git://github.com/gitpython-developers/smmap.git + + +For support, please use the git-python mailing list: + +* http://groups.google.com/group/git-python + + +Issues can be filed on github: + +* https://github.com/gitpython-developers/smmap/issues + +A link to the pypi page related to this repository: + +* https://pypi.org/project/smmap/ + + +## License Information + +*smmap* is licensed under the New BSD License. + diff --git a/.cache/pip/http-v2/6/5/0/7/2/65072c35290c429df2e84cb69eba045284d50944561efa156675456a b/.cache/pip/http-v2/6/5/0/7/2/65072c35290c429df2e84cb69eba045284d50944561efa156675456a new file mode 100644 index 0000000000000000000000000000000000000000..1d00958a4168e439c09979f588b8c82f7710e776 Binary files /dev/null and b/.cache/pip/http-v2/6/5/0/7/2/65072c35290c429df2e84cb69eba045284d50944561efa156675456a differ diff --git a/.cache/pip/http-v2/6/6/6/2/c/6662c3d76e9c2f7783002d2625d92517b2c4b994197bd6d5da887f1e.body b/.cache/pip/http-v2/6/6/6/2/c/6662c3d76e9c2f7783002d2625d92517b2c4b994197bd6d5da887f1e.body new file mode 100644 index 0000000000000000000000000000000000000000..cceb0c2a095c5d3934ff018ff1749abb123046f9 Binary files /dev/null and b/.cache/pip/http-v2/6/6/6/2/c/6662c3d76e9c2f7783002d2625d92517b2c4b994197bd6d5da887f1e.body differ diff --git a/.cache/pip/http-v2/8/5/e/f/e/85efe0b09056afaed0a9932320bb2a590a03afe4bc35e3fffc1e85cd b/.cache/pip/http-v2/8/5/e/f/e/85efe0b09056afaed0a9932320bb2a590a03afe4bc35e3fffc1e85cd new file mode 100644 index 0000000000000000000000000000000000000000..eeecce71213676c994fa05512bd6771ae6fa1ddc Binary files /dev/null and b/.cache/pip/http-v2/8/5/e/f/e/85efe0b09056afaed0a9932320bb2a590a03afe4bc35e3fffc1e85cd differ diff --git a/.cache/pip/http-v2/8/8/b/8/b/88b8bfb8f1d620e081b2b226e7936019ed96f3fadbfbd878f24e6be7 b/.cache/pip/http-v2/8/8/b/8/b/88b8bfb8f1d620e081b2b226e7936019ed96f3fadbfbd878f24e6be7 new file mode 100644 index 0000000000000000000000000000000000000000..0083b91e9f7970d5306cd6abd57a60cce79c0a28 Binary files /dev/null and b/.cache/pip/http-v2/8/8/b/8/b/88b8bfb8f1d620e081b2b226e7936019ed96f3fadbfbd878f24e6be7 differ diff --git a/.cache/pip/http-v2/8/9/2/3/0/89230ee5375192cd78aff8dee73d946e2bcfcfb4c3ec4374132fe597.body b/.cache/pip/http-v2/8/9/2/3/0/89230ee5375192cd78aff8dee73d946e2bcfcfb4c3ec4374132fe597.body new file mode 100644 index 0000000000000000000000000000000000000000..f4ba195f9c2afb61b85b791c10200fb911eab3cd --- /dev/null +++ b/.cache/pip/http-v2/8/9/2/3/0/89230ee5375192cd78aff8dee73d946e2bcfcfb4c3ec4374132fe597.body @@ -0,0 +1,122 @@ +Metadata-Version: 2.1 +Name: aiohappyeyeballs +Version: 2.4.0 +Summary: Happy Eyeballs for asyncio +Home-page: https://github.com/aio-libs/aiohappyeyeballs +License: Python-2.0.1 +Author: J. Nick Koston +Author-email: nick@koston.org +Requires-Python: >=3.8 +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Python Software Foundation License +Classifier: License :: Other/Proprietary License +Classifier: Natural Language :: English +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Topic :: Software Development :: Libraries +Project-URL: Bug Tracker, https://github.com/aio-libs/aiohappyeyeballs/issues +Project-URL: Changelog, https://github.com/aio-libs/aiohappyeyeballs/blob/main/CHANGELOG.md +Project-URL: Documentation, https://aiohappyeyeballs.readthedocs.io +Project-URL: Repository, https://github.com/aio-libs/aiohappyeyeballs +Description-Content-Type: text/markdown + +# aiohappyeyeballs + +

+ + CI Status + + + Documentation Status + + + Test coverage percentage + +

+

+ + Poetry + + + black + + + pre-commit + +

+

+ + PyPI Version + + Supported Python versions + License +

+ +--- + +**Documentation**: https://aiohappyeyeballs.readthedocs.io + +**Source Code**: https://github.com/aio-libs/aiohappyeyeballs + +--- + +[Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs) +([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html)) + +## Use case + +This library exists to allow connecting with +[Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs) +([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html)) +when you +already have a list of addrinfo and not a DNS name. + +The stdlib version of `loop.create_connection()` +will only work when you pass in an unresolved name which +is not a good fit when using DNS caching or resolving +names via another method such as `zeroconf`. + +## Installation + +Install this via pip (or your favourite package manager): + +`pip install aiohappyeyeballs` + +## Example usage + +```python + +addr_infos = await loop.getaddrinfo("example.org", 80) + +socket = await start_connection(addr_infos) +socket = await start_connection(addr_infos, local_addr_infos=local_addr_infos, happy_eyeballs_delay=0.2) + +transport, protocol = await loop.create_connection( + MyProtocol, sock=socket, ...) + +# Remove the first address for each family from addr_info +pop_addr_infos_interleave(addr_info, 1) + +# Remove all matching address from addr_info +remove_addr_infos(addr_info, "dead::beef::") + +# Convert a local_addr to local_addr_infos +local_addr_infos = addr_to_addr_infos(("127.0.0.1",0)) +``` + +## Credits + +This package contains code from cpython and is licensed under the same terms as cpython itself. + +This package was created with +[Copier](https://copier.readthedocs.io/) and the +[browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template) +project template. + diff --git a/.cache/pip/http-v2/8/9/8/0/7/8980772ed68d7fbcfe2ef2b3f1911b9bd45462ad1becf93269532743 b/.cache/pip/http-v2/8/9/8/0/7/8980772ed68d7fbcfe2ef2b3f1911b9bd45462ad1becf93269532743 new file mode 100644 index 0000000000000000000000000000000000000000..acc3413b71c914b9523deda13a378474737c2d9a Binary files /dev/null and b/.cache/pip/http-v2/8/9/8/0/7/8980772ed68d7fbcfe2ef2b3f1911b9bd45462ad1becf93269532743 differ diff --git a/.cache/pip/http-v2/8/a/c/4/d/8ac4d14dc45e27d21da49fb515570b6f875b78707de9b08ce1088d1b b/.cache/pip/http-v2/8/a/c/4/d/8ac4d14dc45e27d21da49fb515570b6f875b78707de9b08ce1088d1b new file mode 100644 index 0000000000000000000000000000000000000000..412e42c23d6524bbcc14fd3144b7921677cef21c Binary files /dev/null and b/.cache/pip/http-v2/8/a/c/4/d/8ac4d14dc45e27d21da49fb515570b6f875b78707de9b08ce1088d1b differ diff --git a/.cache/pip/http-v2/8/a/c/4/d/8ac4d14dc45e27d21da49fb515570b6f875b78707de9b08ce1088d1b.body b/.cache/pip/http-v2/8/a/c/4/d/8ac4d14dc45e27d21da49fb515570b6f875b78707de9b08ce1088d1b.body new file mode 100644 index 0000000000000000000000000000000000000000..c7012f5a0b24f45e7f8d50e5ee86fd907d3e3d7a Binary files /dev/null and b/.cache/pip/http-v2/8/a/c/4/d/8ac4d14dc45e27d21da49fb515570b6f875b78707de9b08ce1088d1b.body differ diff --git a/.cache/pip/http-v2/8/c/3/e/c/8c3ecf585c815a73af16247323d407e99afb8fdc40cee3542187ad49 b/.cache/pip/http-v2/8/c/3/e/c/8c3ecf585c815a73af16247323d407e99afb8fdc40cee3542187ad49 new file mode 100644 index 0000000000000000000000000000000000000000..0bed85549ab52b39a28a4e57986732ca2a6ed1d2 Binary files /dev/null and b/.cache/pip/http-v2/8/c/3/e/c/8c3ecf585c815a73af16247323d407e99afb8fdc40cee3542187ad49 differ diff --git a/.cache/pip/http-v2/8/c/3/e/c/8c3ecf585c815a73af16247323d407e99afb8fdc40cee3542187ad49.body b/.cache/pip/http-v2/8/c/3/e/c/8c3ecf585c815a73af16247323d407e99afb8fdc40cee3542187ad49.body new file mode 100644 index 0000000000000000000000000000000000000000..7a6bbb24b5f05575ac0263dd7fb24e0f0180d641 --- /dev/null +++ b/.cache/pip/http-v2/8/c/3/e/c/8c3ecf585c815a73af16247323d407e99afb8fdc40cee3542187ad49.body @@ -0,0 +1,103 @@ +Metadata-Version: 2.1 +Name: click +Version: 8.1.7 +Summary: Composable command line interface toolkit +Home-page: https://palletsprojects.com/p/click/ +Maintainer: Pallets +Maintainer-email: contact@palletsprojects.com +License: BSD-3-Clause +Project-URL: Donate, https://palletsprojects.com/donate +Project-URL: Documentation, https://click.palletsprojects.com/ +Project-URL: Changes, https://click.palletsprojects.com/changes/ +Project-URL: Source Code, https://github.com/pallets/click/ +Project-URL: Issue Tracker, https://github.com/pallets/click/issues/ +Project-URL: Chat, https://discord.gg/pallets +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: BSD License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Requires-Python: >=3.7 +Description-Content-Type: text/x-rst +License-File: LICENSE.rst +Requires-Dist: colorama ; platform_system == "Windows" +Requires-Dist: importlib-metadata ; python_version < "3.8" + +\$ click\_ +========== + +Click is a Python package for creating beautiful command line interfaces +in a composable way with as little code as necessary. It's the "Command +Line Interface Creation Kit". It's highly configurable but comes with +sensible defaults out of the box. + +It aims to make the process of writing command line tools quick and fun +while also preventing any frustration caused by the inability to +implement an intended CLI API. + +Click in three points: + +- Arbitrary nesting of commands +- Automatic help page generation +- Supports lazy loading of subcommands at runtime + + +Installing +---------- + +Install and update using `pip`_: + +.. code-block:: text + + $ pip install -U click + +.. _pip: https://pip.pypa.io/en/stable/getting-started/ + + +A Simple Example +---------------- + +.. code-block:: python + + import click + + @click.command() + @click.option("--count", default=1, help="Number of greetings.") + @click.option("--name", prompt="Your name", help="The person to greet.") + def hello(count, name): + """Simple program that greets NAME for a total of COUNT times.""" + for _ in range(count): + click.echo(f"Hello, {name}!") + + if __name__ == '__main__': + hello() + +.. code-block:: text + + $ python hello.py --count=3 + Your name: Click + Hello, Click! + Hello, Click! + Hello, Click! + + +Donate +------ + +The Pallets organization develops and supports Click and other popular +packages. In order to grow the community of contributors and users, and +allow the maintainers to devote more time to the projects, `please +donate today`_. + +.. _please donate today: https://palletsprojects.com/donate + + +Links +----- + +- Documentation: https://click.palletsprojects.com/ +- Changes: https://click.palletsprojects.com/changes/ +- PyPI Releases: https://pypi.org/project/click/ +- Source Code: https://github.com/pallets/click +- Issue Tracker: https://github.com/pallets/click/issues +- Chat: https://discord.gg/pallets diff --git a/.cache/pip/http-v2/9/7/2/2/f/9722fb20e3ea9cc35611a7af210f3a3c5763e70a73b0619f2dce743f.body b/.cache/pip/http-v2/9/7/2/2/f/9722fb20e3ea9cc35611a7af210f3a3c5763e70a73b0619f2dce743f.body new file mode 100644 index 0000000000000000000000000000000000000000..41a992b45db4320ae53c7d3e1838b36433dc09ca Binary files /dev/null and b/.cache/pip/http-v2/9/7/2/2/f/9722fb20e3ea9cc35611a7af210f3a3c5763e70a73b0619f2dce743f.body differ diff --git a/.cache/pip/http-v2/9/d/b/4/b/9db4b6605ca6d6ec2ca5f1968d04b28e2b33e27564d483e330c086bf.body b/.cache/pip/http-v2/9/d/b/4/b/9db4b6605ca6d6ec2ca5f1968d04b28e2b33e27564d483e330c086bf.body new file mode 100644 index 0000000000000000000000000000000000000000..522dbb51d72c26cd9028339ed6df74c7d3f392a9 Binary files /dev/null and b/.cache/pip/http-v2/9/d/b/4/b/9db4b6605ca6d6ec2ca5f1968d04b28e2b33e27564d483e330c086bf.body differ diff --git a/.cache/pip/http-v2/e/0/5/f/0/e05f0d91f8df88c9349b141f38a86eaea4bf18c9e6190a296b1ada3b b/.cache/pip/http-v2/e/0/5/f/0/e05f0d91f8df88c9349b141f38a86eaea4bf18c9e6190a296b1ada3b new file mode 100644 index 0000000000000000000000000000000000000000..9d40df268c0aee4bc6c71761337345dfaa11f5ea Binary files /dev/null and b/.cache/pip/http-v2/e/0/5/f/0/e05f0d91f8df88c9349b141f38a86eaea4bf18c9e6190a296b1ada3b differ diff --git a/.cache/pip/http-v2/e/9/9/d/2/e99d273763b5a9911259ba7015a44152ddf05aec2016679f6c849a2a b/.cache/pip/http-v2/e/9/9/d/2/e99d273763b5a9911259ba7015a44152ddf05aec2016679f6c849a2a new file mode 100644 index 0000000000000000000000000000000000000000..4ea47bf0df4ab7faf881acfbd9883deede01b07a Binary files /dev/null and b/.cache/pip/http-v2/e/9/9/d/2/e99d273763b5a9911259ba7015a44152ddf05aec2016679f6c849a2a differ diff --git a/.cache/pip/http-v2/e/a/c/6/1/eac61126daf80149d2a016f12a54eab5e3b5c1dbc77410ff1a97edc4.body b/.cache/pip/http-v2/e/a/c/6/1/eac61126daf80149d2a016f12a54eab5e3b5c1dbc77410ff1a97edc4.body new file mode 100644 index 0000000000000000000000000000000000000000..a6a7ee812912ffadfb49a9aabfae65797b50011e Binary files /dev/null and b/.cache/pip/http-v2/e/a/c/6/1/eac61126daf80149d2a016f12a54eab5e3b5c1dbc77410ff1a97edc4.body differ diff --git a/.cache/pip/http-v2/f/4/3/c/e/f43ce2cb74a8c7ad77da70314e043a539a7f01416550c3167312132b.body b/.cache/pip/http-v2/f/4/3/c/e/f43ce2cb74a8c7ad77da70314e043a539a7f01416550c3167312132b.body new file mode 100644 index 0000000000000000000000000000000000000000..d8dd6d12d6d35bcff6b00d4b3ed960f5eef4b9d0 --- /dev/null +++ b/.cache/pip/http-v2/f/4/3/c/e/f43ce2cb74a8c7ad77da70314e043a539a7f01416550c3167312132b.body @@ -0,0 +1,131 @@ +Metadata-Version: 2.1 +Name: async-timeout +Version: 4.0.3 +Summary: Timeout context manager for asyncio programs +Home-page: https://github.com/aio-libs/async-timeout +Author: Andrew Svetlov +Author-email: andrew.svetlov@gmail.com +License: Apache 2 +Project-URL: Chat: Gitter, https://gitter.im/aio-libs/Lobby +Project-URL: CI: GitHub Actions, https://github.com/aio-libs/async-timeout/actions +Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/async-timeout +Project-URL: GitHub: issues, https://github.com/aio-libs/async-timeout/issues +Project-URL: GitHub: repo, https://github.com/aio-libs/async-timeout +Classifier: Development Status :: 5 - Production/Stable +Classifier: Topic :: Software Development :: Libraries +Classifier: Framework :: AsyncIO +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.7 +Description-Content-Type: text/x-rst +License-File: LICENSE +Requires-Dist: typing-extensions >=3.6.5 ; python_version < "3.8" + +async-timeout +============= +.. image:: https://travis-ci.com/aio-libs/async-timeout.svg?branch=master + :target: https://travis-ci.com/aio-libs/async-timeout +.. image:: https://codecov.io/gh/aio-libs/async-timeout/branch/master/graph/badge.svg + :target: https://codecov.io/gh/aio-libs/async-timeout +.. image:: https://img.shields.io/pypi/v/async-timeout.svg + :target: https://pypi.python.org/pypi/async-timeout +.. image:: https://badges.gitter.im/Join%20Chat.svg + :target: https://gitter.im/aio-libs/Lobby + :alt: Chat on Gitter + +asyncio-compatible timeout context manager. + + +Usage example +------------- + + +The context manager is useful in cases when you want to apply timeout +logic around block of code or in cases when ``asyncio.wait_for()`` is +not suitable. Also it's much faster than ``asyncio.wait_for()`` +because ``timeout`` doesn't create a new task. + +The ``timeout(delay, *, loop=None)`` call returns a context manager +that cancels a block on *timeout* expiring:: + + from async_timeout import timeout + async with timeout(1.5): + await inner() + +1. If ``inner()`` is executed faster than in ``1.5`` seconds nothing + happens. +2. Otherwise ``inner()`` is cancelled internally by sending + ``asyncio.CancelledError`` into but ``asyncio.TimeoutError`` is + raised outside of context manager scope. + +*timeout* parameter could be ``None`` for skipping timeout functionality. + + +Alternatively, ``timeout_at(when)`` can be used for scheduling +at the absolute time:: + + loop = asyncio.get_event_loop() + now = loop.time() + + async with timeout_at(now + 1.5): + await inner() + + +Please note: it is not POSIX time but a time with +undefined starting base, e.g. the time of the system power on. + + +Context manager has ``.expired`` property for check if timeout happens +exactly in context manager:: + + async with timeout(1.5) as cm: + await inner() + print(cm.expired) + +The property is ``True`` if ``inner()`` execution is cancelled by +timeout context manager. + +If ``inner()`` call explicitly raises ``TimeoutError`` ``cm.expired`` +is ``False``. + +The scheduled deadline time is available as ``.deadline`` property:: + + async with timeout(1.5) as cm: + cm.deadline + +Not finished yet timeout can be rescheduled by ``shift_by()`` +or ``shift_to()`` methods:: + + async with timeout(1.5) as cm: + cm.shift(1) # add another second on waiting + cm.update(loop.time() + 5) # reschedule to now+5 seconds + +Rescheduling is forbidden if the timeout is expired or after exit from ``async with`` +code block. + + +Installation +------------ + +:: + + $ pip install async-timeout + +The library is Python 3 only! + + + +Authors and License +------------------- + +The module is written by Andrew Svetlov. + +It's *Apache 2* licensed and freely available. diff --git a/.cache/pip/http-v2/f/5/2/7/6/f52769e4b4d00542e1e056baf2db3e5ad8f277bff67f2636cace711d b/.cache/pip/http-v2/f/5/2/7/6/f52769e4b4d00542e1e056baf2db3e5ad8f277bff67f2636cace711d new file mode 100644 index 0000000000000000000000000000000000000000..217b040ddc619938a58ecce3c59782bc07056ebb Binary files /dev/null and b/.cache/pip/http-v2/f/5/2/7/6/f52769e4b4d00542e1e056baf2db3e5ad8f277bff67f2636cace711d differ diff --git a/.cache/pip/http-v2/f/b/c/e/7/fbce770ef113d7303a71734c8a71c6ac1b2cbc4e832a8e70832c37ca.body b/.cache/pip/http-v2/f/b/c/e/7/fbce770ef113d7303a71734c8a71c6ac1b2cbc4e832a8e70832c37ca.body new file mode 100644 index 0000000000000000000000000000000000000000..188d36268ad581b0959c9d634af7481087ff52cf Binary files /dev/null and b/.cache/pip/http-v2/f/b/c/e/7/fbce770ef113d7303a71734c8a71c6ac1b2cbc4e832a8e70832c37ca.body differ diff --git a/.cache/pip/http-v2/f/b/e/3/a/fbe3a5eb3735a745707ab3bf39e17d76ea29c7cd1eaa7763f11e1766.body b/.cache/pip/http-v2/f/b/e/3/a/fbe3a5eb3735a745707ab3bf39e17d76ea29c7cd1eaa7763f11e1766.body new file mode 100644 index 0000000000000000000000000000000000000000..fc964525f05e8e34961f0398b1930b8dec64ef26 --- /dev/null +++ b/.cache/pip/http-v2/f/b/e/3/a/fbe3a5eb3735a745707ab3bf39e17d76ea29c7cd1eaa7763f11e1766.body @@ -0,0 +1,128 @@ +Metadata-Version: 2.1 +Name: aiosignal +Version: 1.3.1 +Summary: aiosignal: a list of registered asynchronous callbacks +Home-page: https://github.com/aio-libs/aiosignal +Maintainer: aiohttp team +Maintainer-email: team@aiohttp.org +License: Apache 2.0 +Project-URL: Chat: Gitter, https://gitter.im/aio-libs/Lobby +Project-URL: CI: GitHub Actions, https://github.com/aio-libs/aiosignal/actions +Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/aiosignal +Project-URL: Docs: RTD, https://docs.aiosignal.org +Project-URL: GitHub: issues, https://github.com/aio-libs/aiosignal/issues +Project-URL: GitHub: repo, https://github.com/aio-libs/aiosignal +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Intended Audience :: Developers +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Development Status :: 5 - Production/Stable +Classifier: Operating System :: POSIX +Classifier: Operating System :: MacOS :: MacOS X +Classifier: Operating System :: Microsoft :: Windows +Classifier: Framework :: AsyncIO +Requires-Python: >=3.7 +Description-Content-Type: text/x-rst +License-File: LICENSE +Requires-Dist: frozenlist (>=1.1.0) + +========= +aiosignal +========= + +.. image:: https://github.com/aio-libs/aiosignal/workflows/CI/badge.svg + :target: https://github.com/aio-libs/aiosignal/actions?query=workflow%3ACI + :alt: GitHub status for master branch + +.. image:: https://codecov.io/gh/aio-libs/aiosignal/branch/master/graph/badge.svg + :target: https://codecov.io/gh/aio-libs/aiosignal + :alt: codecov.io status for master branch + +.. image:: https://badge.fury.io/py/aiosignal.svg + :target: https://pypi.org/project/aiosignal + :alt: Latest PyPI package version + +.. image:: https://readthedocs.org/projects/aiosignal/badge/?version=latest + :target: https://aiosignal.readthedocs.io/ + :alt: Latest Read The Docs + +.. image:: https://img.shields.io/discourse/topics?server=https%3A%2F%2Faio-libs.discourse.group%2F + :target: https://aio-libs.discourse.group/ + :alt: Discourse group for io-libs + +.. image:: https://badges.gitter.im/Join%20Chat.svg + :target: https://gitter.im/aio-libs/Lobby + :alt: Chat on Gitter + +Introduction +============ + +A project to manage callbacks in `asyncio` projects. + +``Signal`` is a list of registered asynchronous callbacks. + +The signal's life-cycle has two stages: after creation its content +could be filled by using standard list operations: ``sig.append()`` +etc. + +After you call ``sig.freeze()`` the signal is *frozen*: adding, removing +and dropping callbacks is forbidden. + +The only available operation is calling the previously registered +callbacks by using ``await sig.send(data)``. + +For concrete usage examples see the `Signals + +section of the `Web Server Advanced +` chapter of the `aiohttp +documentation`_. + + +Installation +------------ + +:: + + $ pip install aiosignal + +The library requires Python 3.6 or newer. + + +Documentation +============= + +https://aiosignal.readthedocs.io/ + +Communication channels +====================== + +*gitter chat* https://gitter.im/aio-libs/Lobby + +Requirements +============ + +- Python >= 3.6 +- frozenlist >= 1.0.0 + +License +======= + +``aiosignal`` is offered under the Apache 2 license. + +Source code +=========== + +The project is hosted on GitHub_ + +Please file an issue in the `bug tracker +`_ if you have found a bug +or have some suggestions to improve the library. + +.. _GitHub: https://github.com/aio-libs/aiosignal +.. _aiohttp documentation: https://docs.aiohttp.org/ diff --git a/.cache/pip/http-v2/f/c/a/5/b/fca5b18fd877930924e4c3ed44a7de4862861d131c1248697b107213 b/.cache/pip/http-v2/f/c/a/5/b/fca5b18fd877930924e4c3ed44a7de4862861d131c1248697b107213 new file mode 100644 index 0000000000000000000000000000000000000000..30774b6bf2f77f40d481d71c1ae7f9b6357f3702 Binary files /dev/null and b/.cache/pip/http-v2/f/c/a/5/b/fca5b18fd877930924e4c3ed44a7de4862861d131c1248697b107213 differ diff --git a/.cache/pip/wheels/7e/e3/c3/89c7a2f3c4adc07cd1c675f8bb7b9ad4d18f64a72bccdfe826/origin.json b/.cache/pip/wheels/7e/e3/c3/89c7a2f3c4adc07cd1c675f8bb7b9ad4d18f64a72bccdfe826/origin.json new file mode 100644 index 0000000000000000000000000000000000000000..cb2caa627d2e0a24521ea03a1c49581e5eec6b98 --- /dev/null +++ b/.cache/pip/wheels/7e/e3/c3/89c7a2f3c4adc07cd1c675f8bb7b9ad4d18f64a72bccdfe826/origin.json @@ -0,0 +1 @@ +{"archive_info": {"hash": "sha256=5bfae9500ad8e7d2937ebccb4906f3bc464d1bf66eedd0e4adabd520811c7b52", "hashes": {"sha256": "5bfae9500ad8e7d2937ebccb4906f3bc464d1bf66eedd0e4adabd520811c7b52"}}, "url": "https://files.pythonhosted.org/packages/cd/1e/21321670cd3c2f225026d9fd89272cae661529238850e79f48ccf2f9e4e3/flash_attn-2.6.3.tar.gz"} \ No newline at end of file diff --git a/.cache/wandb/logs/core-debug-20240926_180107.log b/.cache/wandb/logs/core-debug-20240926_180107.log new file mode 100644 index 0000000000000000000000000000000000000000..37aa3b998f06a1c590cd07073c5b5426bab2d7e9 --- /dev/null +++ b/.cache/wandb/logs/core-debug-20240926_180107.log @@ -0,0 +1,9 @@ +{"time":"2024-09-26T18:01:07.637065841Z","level":"INFO","msg":"started logging, with flags","port-filename":"/tmp/tmpn3byfp8o/port-5326.txt","pid":5326,"debug":false,"disable-analytics":false} +{"time":"2024-09-26T18:01:07.637109316Z","level":"INFO","msg":"FeatureState","shutdownOnParentExitEnabled":false} +{"time":"2024-09-26T18:01:07.637939058Z","level":"INFO","msg":"Will exit if parent process dies.","ppid":5326} +{"time":"2024-09-26T18:01:07.637918908Z","level":"INFO","msg":"server is running","addr":{"IP":"127.0.0.1","Port":38193,"Zone":""}} +{"time":"2024-09-26T18:01:07.833948201Z","level":"INFO","msg":"created new connection","id":"127.0.0.1:53288"} +{"time":"2024-09-26T18:01:08.272107166Z","level":"INFO","msg":"connection init received","streamId":"qqp17sde","id":"127.0.0.1:53288"} +{"time":"2024-09-26T18:01:08.272615297Z","level":"ERROR","msg":"error creating symlink","error":"symlink /root/.cache/wandb/logs/core-debug-20240926_180107.log /root/wandb/run-20240926_180108-qqp17sde/logs/debug-core.log: file exists"} +{"time":"2024-09-26T18:01:08.275500036Z","level":"INFO","msg":"connection init completed","streamId":"qqp17sde","id":"127.0.0.1:53288"} +{"time":"2024-09-26T18:06:51.692081081Z","level":"INFO","msg":"Parent process exited, terminating service process."} diff --git a/.jupyter/migrated b/.jupyter/migrated new file mode 100644 index 0000000000000000000000000000000000000000..e647f58e045d07ce9ebf0250031f001299b4edc7 --- /dev/null +++ b/.jupyter/migrated @@ -0,0 +1 @@ +2024-09-25T18:27:22.795502+00:00 \ No newline at end of file diff --git a/.jupyter/nbconfig/notebook.json b/.jupyter/nbconfig/notebook.json new file mode 100644 index 0000000000000000000000000000000000000000..f85a2fbad79dc5f498e1e42cb0f84c2d9b78e9de --- /dev/null +++ b/.jupyter/nbconfig/notebook.json @@ -0,0 +1,7 @@ +{ + "load_extensions": { + "nbextensions_configurator/config_menu/main": true, + "contrib_nbextensions_help_item/main": true, + "jupyter-js-widgets/extension": true + } +} \ No newline at end of file diff --git a/.jupyter/nbconfig/tree.json b/.jupyter/nbconfig/tree.json new file mode 100644 index 0000000000000000000000000000000000000000..92be27f910eba06a9c353894cc39b7e9d7d3f076 --- /dev/null +++ b/.jupyter/nbconfig/tree.json @@ -0,0 +1,6 @@ +{ + "load_extensions": { + "nbextensions_configurator/tree_tab/main": true, + "nbzip/tree": true + } +} \ No newline at end of file diff --git a/.local/share/jupyter/nbextensions/addbefore/icon.png b/.local/share/jupyter/nbextensions/addbefore/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0d77505d5b51986892cec5af2b7d1d7a0c23762d Binary files /dev/null and b/.local/share/jupyter/nbextensions/addbefore/icon.png differ diff --git a/.local/share/jupyter/nbextensions/addbefore/readme.md b/.local/share/jupyter/nbextensions/addbefore/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..811adb6ee58ef1b275e0ea3429b0621b588f749b --- /dev/null +++ b/.local/share/jupyter/nbextensions/addbefore/readme.md @@ -0,0 +1,12 @@ +Addbefore +========= + +This extension adds a button to add a empty cell before the currently active cell. +As was present in IPython 1.0. +It is with a circled up arrow. +The plus signed "Add Cell After button" is moved to be next to Add Cell Before, +and given matching circled down arrow icon. + +The functionality of the buttons are as per in the Insert Menu, +for Insert Cell Above, and Insert Cell Below. +A empty cell is added, and it takes the cursor focus. diff --git a/.local/share/jupyter/nbextensions/autosavetime/README.md b/.local/share/jupyter/nbextensions/autosavetime/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0006d5bc6d8a7f3e6282921fca48dbc35acd1b05 --- /dev/null +++ b/.local/share/jupyter/nbextensions/autosavetime/README.md @@ -0,0 +1,20 @@ +autosavetime +============ + + +Description +----------- + +Optionally set the notebook autosave interval, and/or add a selector to the +toolbar to set it. + + +Parameters +---------- + +* `autosavetime_set_starting_interval` - + Set an autosave interval on notebook load. If false, the default is unchanged. +* `autosavetime_starting_interval` - + Autosave interval (in minutes) which would be set on notebook load. +* `autosavetime_show_selector` - + Add a selector to the toolbar to change the autosave interval diff --git a/.local/share/jupyter/nbextensions/autosavetime/autosavetime.yaml b/.local/share/jupyter/nbextensions/autosavetime/autosavetime.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6616d565fcce7bfd1695cad678d7ac045a0a8af1 --- /dev/null +++ b/.local/share/jupyter/nbextensions/autosavetime/autosavetime.yaml @@ -0,0 +1,22 @@ +Type: IPython Notebook Extension +Compatibility: 3.x, 4.x, 5.x +Name: AutoSaveTime +Main: main.js +Icon: icon.png +Link: README.md +Description: Optionally set the notebook autosave interval, and/or add a selector to the toolbar to set it +Parameters: +- name: autosavetime_set_starting_interval + description: Set an autosave interval on notebook load. If false, the default is unchanged. + input_type: checkbox + default: false +- name: autosavetime_starting_interval + description: Autosave interval (in minutes) which would be set on notebook load. + input_type: number + min: 0 + step: 1 + default: 2 +- name: autosavetime_show_selector + description: add a selector to the toolbar to change the autosave interval + input_type: checkbox + default: true diff --git a/.local/share/jupyter/nbextensions/cell_filter/cell_filter.yml b/.local/share/jupyter/nbextensions/cell_filter/cell_filter.yml new file mode 100644 index 0000000000000000000000000000000000000000..182771389a1b0293446d28e4de86847fa8ac41a1 --- /dev/null +++ b/.local/share/jupyter/nbextensions/cell_filter/cell_filter.yml @@ -0,0 +1,7 @@ +Type: Jupyter Notebook Extension +Compatibility: 4.x, 5.x +Name: Cell Filter +Main: cell_filter.js +Link: README.md +Description: | + An extension that allows you to filter cells by tags. Keywords entered into the search bar separated by spaces joins them with logical AND. diff --git a/.local/share/jupyter/nbextensions/code_prettify/README.md b/.local/share/jupyter/nbextensions/code_prettify/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2fe94625b3d2e1ebda72ed310608176047f2e80b --- /dev/null +++ b/.local/share/jupyter/nbextensions/code_prettify/README.md @@ -0,0 +1,302 @@ +KernelExecOnCells library and nbextensions +========================================== + +The KernelExecOnCells library is a shared library for creating Jupyter +nbextensions which transform code cell text using calls to the active kernel. + +This scheme has been applied to create several nbextensions which are also +included in the repository. +For instance, to prettify code, see the [code-prettify] nbextension, or to +refactor python 2 code for python 3, see the [2to3] extension. +These nbextensions are defined as simple plugins of the main KernelExecOnCells +library. Defining such a plugin, [jupyter-autopep8], is described in the last section below. + + +Compatible Kernels +------------------ + +The library is kernel-language agnostic, as described in the [internals] +section below. Essentially any kernel capable of interpreting and creating +json-formatted strings, and sending them to the stream output (where print +statements in most languages go) should be easy to integrate. +Hopefully, that covers pretty much all languages! + + +Options +------- + +The library uses a series of options, describing the configuration of the +plugin. Default values for these options are specified as an object in the +plugin source file, and can be overriden by values loaded from config. +There are a few nbextension-wide options, configurable using the +[jupyter_nbextensions_configurator] or by editing the `notebook` section config +file directly. +If `mod_name` is the name of the plugin module (e.g. `code_prettify`, `2to3`, +...) and `LANG` the lowercased kernel language (eg julia, python, r ...), then +the options are as follows: + +- `mod_name.add_toolbar_button`: + Whether to add a toolbar button to transform the selected cell(s). + Defaults to `true`. + +- `mod_name.button_icon`: + A font-awesome class defining the icon used for the toolbar button and + actions. See [fontawesome] for available icon classes. + Defaults to `fa-legal`. + +- `mod_name.button_label`: + Toolbar button label text. Also used in the actions' help text. + Defaults to `mod_name`. + +- `mod_name.register_hotkey`: + Whether to register hotkeys to transform the selected cell(s)/whole notebook. + Defaults to `true`. + +- `mod_name.hotkeys.process_all`: + Hotkey to use to transform all the code cells in the notebook. + Defaults to `Ctrl-Shift-L`. + +- `mod_name.hotkeys.process_selected`: + Hotkey to use to transform the selected cell(s). + Defaults to `Ctrl-L`. + +- `mod_name.show_alerts_for_errors`: + Whether to show alerts for errors in the kernel calls. + Defaults to `true`. + +- `mod_name.kernel_config_map_json`: + The value of this key is a string which can be parsed into a json object + giving the config for each kernel language. + + The following give the per-kernel options of the parsed json, using the + language key `LANG`, to be replaced as appropriate: + + * `mod_name.kernel_config_map_json.LANG.library`: + String to execute in the kernel in order to load any necessary kernel + libraries. + + * `mod_name.kernel_config_map_json.LANG.replacements_json_to_kernel`: + a list of pairs of strings, used as arguments to javascript's + `String.replace(from, to)` to translate from a json string into a valid + representation of the same string in the kernel language. Since json + strings are particularly simple, this can often (as with the python + language) be left as the default, an empty list. + + * `mod_name.kernel_config_map_json.LANG.prefix` and + `mod_name.kernel_config_map_json.LANG.postfix`: + strings added as bookends to the kernel string (translated from the json + string using the replacements above) to make up the kernel prettifier call + kernel's prettifier libraries. + + * `mod_name.kernel_config_map_json.LANG.trim_formatted_text`: + Whether to trim whitespace from the transformed cell text. Since jupyter + cells don't usually have leading or trailing whitespace, the default + behaviour is to trim the transformed text, in order to prevent the + transform adding extra newlines at the end (a common behaviour for source + files, where having a trailing newline is often considered good practice). + + +Internals +--------- + +The model is essentially: + +1. The cell text is grabbed by client-side javascript, then turned into a json + string using javascript `JSON.stringify`. Since json-compatible strings are + a particularly simple string format, which is compatible with many other + programming languages without much modification (e.g. a valid json string + is also a valid string in python 3, and also in python 2 when prefixed with + a `u`), and easily converted for use in others (because of its simplicity). + +2. Optional regex replacements are used to translate the json-format string + into a valid kernel string. Python, R and javascript don't require this + step, but other languages may do, so it's implemented for flexibility + using the per-kernel config key `replacements_json_to_kernel`, which is a + list of pairs of arguments to javascript `String.replace`. + +3. The kernel-specific prettifier call is then composed from + `kernel_config.prefix` + `kernel_text_string` + `kernel_config.postfix` and + sent to the kernel for execution. This kernel call is expected to get the + formatted cell text _printed_ as a json-compatible string. Since most + kernel languages have json packages, this should hopefully be easy to + arrange. The reason for the printing text rather than simply displaying it, + is that it prevents us having to translate from a kernel string + representing a json string. + +4. The callback for the kernel execution in client-side javascript parses the + printed json-format string, optionally trims trailing whitespace according + to the `trim_formatted_text` key (which defaults to `true`) in the + per-kernel config, and then sets the cell text using the result. + +The process is probably best illustrated using an example for the python +implementation in `code_prettify`: + +1. **At nbextension load**, the `code_prettify.kernel_config_map_json` config + option is parsed to give the json object + + ```json + { + "python": { + "library": "import json\nimport yapf.yapflib.yapf_api", + "prefix": "print(json.dumps(yapf.yapflib.yapf_api.FormatCode(u", + "postfix": ")[0]))" + } + } + ``` + + (other kernel languages are omitted for clarity). + +2. **On kernel becoming ready**, the nbextension looks up the config for the + kernel's language (in our example, this is the `python` key of the kernel + config json object above). It then sends the kernel config's `library` + string to the kernel for execution. Thus the python implementation above + executes + + ```python + import json + import yapf.yapflib.yapf_api + ``` + +3. **On requesting a cell be prettified** which can happen by clicking the + toolbar, or with a (configurable) hotkey, the following happens: + + Say the cell to be formatted contains the following ugly python code: + + ```python + msg= 'hello '+"world" + print ( + msg ) + ``` + + Then the result of the `JSON.stringify` call will be a string containing + + ```json + "msg= 'hello '+\"world\"\nprint (\n msg )" + ``` + + (note the opening and closing quotes). Concatenating this with the prefix & + postfix strings from the python kernel config above, gives us the kernel + code to execute. The call sent to the python kernel is therefore + + ```python + print(json.dumps(yapf.yapflib.yapf_api.FormatCode(u"msg= 'hello '+\"world\"\nprint (\n msg )")[0])) + ``` + +4. What gets 'printed' by the kernel (i.e. returned to the javascript stream + callback) is the following json-format string: + + ```json + "msg = 'hello ' + \"world\"\nprint(msg)\n" + ``` + + The default is to trim whitepace from the returned prettified text, which + results in the final prettified python code for the cell: + + ```python + msg = 'hello ' + "world" + print(msg) + ``` + + +Defining a new plugin +--------------------- + +As an example, we will add a new plugin which reformats code using the +[autopep8] module in python, rather than the [yapf] library used by +`code_prettify`. Such a plugin, [jupyter-autopep8] was developed by [@kenkoooo] +as a fork of an old version of `code_prettify`. Redefining it here has the +advantage of using the updated and more-robust architecture, in addition to +making it possible to reformat the whole notebook in one go. + +For this new nbextension, we just have to run `import autopep8` as the kernel +library code, and then call the `autopep8.fix_code` function on cells' text. +Hence what we have to do is: + +- copy `code_prettify.js` to `autopep8.js` + +- update `mod_name`, `hotkeys`, `button_icon` default config values in the new + `autopep8.js`. Also update the `cfg.kernel_config_map` value to use the + correct kernel code: + ```javascript + cfg.kernel_config_map = { // map of options for supported kernels + "python": { + "library": "import json\nimport autopep8", + "prefix": "print(json.dumps(autopep8.fix_code(u", + "postfix": ")))" + } + }; + ``` + +- copy `code_prettify.yaml` to `autopep8.yaml`, and update its values (name, + require, readme, plus the new defaults for hotkeys, icon, and + kernel_config_map + +- that's all :-) + +Of course, for this simple case, one could equally have just updated the +configuration of `code_prettify` using the [jupyter_nbextensions_configurator] +to use [autopep8] instead of [yapf] to reformat the python code. +But, if you want two alternative prettifiers available for the same kernel +language, we need to define separate plugins. + +Custom Yapf Styles +------------------ + +Using the default `yapf` engine, one may define a custom formatting style according to the [package documentation](https://github.com/google/yapf#formatting-style). + +The `code_prettify` extension is configured to follow the default `yapf` ordering (minus the command line option) and will search for the formatting style in the following manner: + +> 1. In the [style] section of a .style.yapf file in either the current directory or one of its parent directories. +> 2. In the [yapf] section of a setup.cfg file in either the current directory or one of its parent directories. +> 3. In the ~/.config/yapf/style file in your home directory. +> +> If none of those files are found, the default style is used (PEP8). + +This means that one can set up a globa custom yapf style using `~/.config/yapf/style` or a project-specific one using the project directory. + +History +------- + +- [@jfbercher], august 14, 2016, first version, named `yapf_ext` +- [@jfbercher], august 19, 2016, second version `code_prettify` + - introduced support for R and javascript. + - changed extension name from `yapf_ext` to `code_prettify` +- [@jcb91], december 2016 + - made addition of toolbar button & hotkey configurable + - reworked to avoid regex replacements for conversion to/from kernel string + formats, in favour of json-string interchange + - made kernel-specific prettifier calls configurable, allowing support for + different prettifiers & arbitrary kernels + - improved documentation +- [@jfbercher], december 2016-january 2017 + - added a configurable shortkey to reflow the whole notebook + - extracted most of the code to build a general library of functions, + `kernel_exec_on_cell.js`, which can be used for all nbextensions which + needs to exec some code (via the current kernel) on the text from cells. + - added 2to3 as a plugin to the shared library +- [@jcb91], january 2017 + - library: Use actions to avoid problems with auto-generated actions + generated by keyboard_manager, which were overwriting each other. + Also fix toolbar button removal. +- [@jfbercher], january 2017 + - updated documentation + - added autopep8 nbextension as a plugin using the shared library +- [@artificialsoph], Jan 2018 + - updated documentation + - changed default behavior to load custom yapf styles +- [@jfbercher], April 2019 + - corrected an issue in configs merge + - added an option for displaying an alert if kernel is not supported and turned it off by default (instead issue a warning in the js console). + +[2to3]: README_2to3.md +[@jcb91]: https://github.com/jcb91 +[@jfbercher]: https://github.com/jfbercher +[@kenkoooo]: https://github.com/kenkoooo +[autopep8]: https://github.com/hhatto/autopep8 +[code-prettify]: README_code_prettify.md +[jupyter-autopep8]: README_autopep8.md +[fontawesome]: https://fontawesome.com/icons +[internals]: #Internals +[jupyter-autopep8]: https://github.com/kenkoooo/jupyter-autopep8 +[jupyter_nbextensions_configurator]: https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator +[yapf]: https://github.com/google/yapf diff --git a/.local/share/jupyter/nbextensions/code_prettify/demo-py.gif b/.local/share/jupyter/nbextensions/code_prettify/demo-py.gif new file mode 100644 index 0000000000000000000000000000000000000000..2e8d85c1a7b2cd13021b9ec84a71c34dced8f066 Binary files /dev/null and b/.local/share/jupyter/nbextensions/code_prettify/demo-py.gif differ diff --git a/.local/share/jupyter/nbextensions/codefolding/codefolding_firstline_folded.png b/.local/share/jupyter/nbextensions/codefolding/codefolding_firstline_folded.png new file mode 100644 index 0000000000000000000000000000000000000000..4ce9908a53d8777c9261978c7518a2ef86e6713d Binary files /dev/null and b/.local/share/jupyter/nbextensions/codefolding/codefolding_firstline_folded.png differ diff --git a/.local/share/jupyter/nbextensions/codefolding/codefolding_indent_folded_1.png b/.local/share/jupyter/nbextensions/codefolding/codefolding_indent_folded_1.png new file mode 100644 index 0000000000000000000000000000000000000000..e5b98b7d905b5482e7647aa13fee3df7b5cbfdae Binary files /dev/null and b/.local/share/jupyter/nbextensions/codefolding/codefolding_indent_folded_1.png differ diff --git a/.local/share/jupyter/nbextensions/codefolding/codefolding_indent_unfolded.png b/.local/share/jupyter/nbextensions/codefolding/codefolding_indent_unfolded.png new file mode 100644 index 0000000000000000000000000000000000000000..0e07bb7dbd64785a1b130052fe842c3828d83f95 Binary files /dev/null and b/.local/share/jupyter/nbextensions/codefolding/codefolding_indent_unfolded.png differ diff --git a/.local/share/jupyter/nbextensions/codefolding/foldgutter.css b/.local/share/jupyter/nbextensions/codefolding/foldgutter.css new file mode 100644 index 0000000000000000000000000000000000000000..e0eee3265d694b9c9080b449bb7428e300b1eef7 --- /dev/null +++ b/.local/share/jupyter/nbextensions/codefolding/foldgutter.css @@ -0,0 +1,5 @@ +.CodeMirror-foldgutter { + width: .9em; +} + + diff --git a/.local/share/jupyter/nbextensions/codefolding/magic-folded.png b/.local/share/jupyter/nbextensions/codefolding/magic-folded.png new file mode 100644 index 0000000000000000000000000000000000000000..6c230955a33b3d028162fd5aa4c52999148c1956 Binary files /dev/null and b/.local/share/jupyter/nbextensions/codefolding/magic-folded.png differ diff --git a/.local/share/jupyter/nbextensions/codefolding/main.js b/.local/share/jupyter/nbextensions/codefolding/main.js new file mode 100644 index 0000000000000000000000000000000000000000..6c512db130b85ca8ef4a361cb5448cf5c4f8c282 --- /dev/null +++ b/.local/share/jupyter/nbextensions/codefolding/main.js @@ -0,0 +1,282 @@ +// Allow codefolding in code cells +// +// This extension enables the CodeMirror feature +// It works by adding a gutter area to each code cell. +// Fold-able code is marked using small triangles in the gutter. +// +// The current folding state is saved in the cell metadata as an array +// of line numbers. +// Format: cell.metadata.code_folding = [ line1, line2, line3, ...] +// + +define([ + 'base/js/namespace', + 'jquery', + 'require', + 'base/js/events', + 'services/config', + 'notebook/js/codecell', + 'codemirror/lib/codemirror', + 'codemirror/addon/fold/foldcode', + 'codemirror/addon/fold/foldgutter', + 'codemirror/addon/fold/brace-fold', + 'codemirror/addon/fold/indent-fold' +], function (Jupyter, $, requirejs, events, configmod, codecell, CodeMirror) { + "use strict"; + + // define default config parameter values + var params = { + codefolding_hotkey : 'Alt-f', + init_delay : 1000 + }; + + // updates default params with any specified in the provided config data + var update_params = function (config_data) { + for (var key in params) { + if (config_data.hasOwnProperty(key)) { + params[key] = config_data[key]; + } + } + }; + + var on_config_loaded = function () { + if (Jupyter.notebook !== undefined) { + // register actions with ActionHandler instance + var prefix = 'auto'; + var name = 'toggle-codefolding'; + var action = { + icon: 'fa-comment-o', + help : 'Toggle codefolding', + help_index : 'ec', + id : 'toggle_codefolding', + handler : toggleFolding + }; + var action_full_name = Jupyter.keyboard_manager.actions.register(action, name, prefix); + + // define keyboard shortcuts + var edit_mode_shortcuts = {}; + edit_mode_shortcuts[params.codefolding_hotkey] = action_full_name; + + // register keyboard shortcuts with keyboard_manager + Jupyter.notebook.keyboard_manager.edit_shortcuts.add_shortcuts(edit_mode_shortcuts); + Jupyter.notebook.keyboard_manager.command_shortcuts.add_shortcuts(edit_mode_shortcuts); + } + else { + // we're in edit view + var extraKeys = Jupyter.editor.codemirror.getOption('extraKeys'); + extraKeys[params.codefolding_hotkey] = toggleFolding; + CodeMirror.normalizeKeyMap(extraKeys); + console.log('[codefolding] binding hotkey', params.codefolding_hotkey); + Jupyter.editor.codemirror.setOption('extraKeys', extraKeys); + } + }; + + /* + * Toggle folding on/off at current line + * + * @param cm CodeMirror instance + * + */ + function toggleFolding () { + var cm; + var pos = {line: 0, ch: 0, xRel: 0}; + if (Jupyter.notebook !== undefined) { + cm = Jupyter.notebook.get_selected_cell().code_mirror; + if (Jupyter.notebook.mode === 'edit') { + pos = cm.getCursor(); + } + } + else { + cm = Jupyter.editor.codemirror; + pos = cm.getCursor(); + } + var opts = cm.state.foldGutter.options; + cm.foldCode(pos, opts.rangeFinder); + } + + /** + * Update cell metadata with folding info, so folding state can be restored after reloading notebook + * + * @param cm CodeMirror instance + */ + function updateMetadata (cm) { + var list = cm.getAllMarks(); + var lines = []; + for (var i = 0; i < list.length; i++) { + if (list[i].__isFold) { + var range = list[i].find(); + lines.push(range.from.line); + } + } + /* User can click on gutter of unselected cells, so make sure we store metadata in the correct cell */ + var cell = Jupyter.notebook.get_selected_cell(); + if (cell.code_mirror !== cm) { + var cells = Jupyter.notebook.get_cells(); + var ncells = Jupyter.notebook.ncells(); + for (var k = 0; k < ncells; k++) { + var _cell = cells[k]; + if (_cell.code_mirror === cm ) { cell = _cell; break; } + } + } + cell.metadata.code_folding = lines; + } + + /** + * Activate codefolding in CodeMirror options, don't overwrite other settings + * + * @param cm codemirror instance + */ + function activate_cm_folding (cm) { + var gutters = cm.getOption('gutters').slice(); + if ( $.inArray("CodeMirror-foldgutter", gutters) < 0) { + gutters.push('CodeMirror-foldgutter'); + cm.setOption('gutters', gutters); + } + + /* set indent or brace folding */ + var opts = true; + if (Jupyter.notebook) { + opts = { + rangeFinder: new CodeMirror.fold.combine( + CodeMirror.fold.firstline, + CodeMirror.fold.magic, + CodeMirror.fold.blockcomment, + cm.getMode().fold === 'indent' ? CodeMirror.fold.indent : CodeMirror.fold.brace + ) + }; + } + cm.setOption('foldGutter', opts); + } + + /** + * Restore folding status from metadata + * @param cell + */ + var restoreFolding = function (cell) { + if (cell.metadata.code_folding === undefined || !(cell instanceof codecell.CodeCell)) { + return; + } + // visit in reverse order, as otherwise nested folds un-fold outer ones + var lines = cell.metadata.code_folding.slice().sort(); + for (var idx = lines.length - 1; idx >= 0; idx--) { + var line = lines[idx]; + var opts = cell.code_mirror.state.foldGutter.options; + var linetext = cell.code_mirror.getLine(line); + if (linetext !== undefined) { + cell.code_mirror.foldCode(CodeMirror.Pos(line, 0), opts.rangeFinder); + } + else { + // the line doesn't exist, so we should remove it from metadata + cell.metadata.code_folding = lines.slice(0, idx); + } + cell.code_mirror.refresh(); + } + }; + + /** + * Add codefolding gutter to a new cell + * + * @param event + * @param nbcell + * + */ + var createCell = function (event, nbcell) { + var cell = nbcell.cell; + if ((cell instanceof codecell.CodeCell)) { + activate_cm_folding(cell.code_mirror); + cell.code_mirror.on('fold', updateMetadata); + cell.code_mirror.on('unfold', updateMetadata); + // queue restoring folding, to run once metadata is set, hopefully. + // This can be useful if cells are un-deleted, for example. + setTimeout(function () { restoreFolding(cell); }, 500); + } + }; + + /* + * Initialize gutter in existing cells + * + */ + var initExistingCells = function () { + var cells = Jupyter.notebook.get_cells(); + var ncells = Jupyter.notebook.ncells(); + for (var i = 0; i < ncells; i++) { + var cell = cells[i]; + if ((cell instanceof codecell.CodeCell)) { + activate_cm_folding(cell.code_mirror); + /* restore folding state if previously saved */ + restoreFolding(cell); + cell.code_mirror.on('fold', updateMetadata); + cell.code_mirror.on('unfold', updateMetadata); + } + } + events.on('create.Cell', createCell); + }; + + /** + * Load my own CSS file + * + * @param name off CSS file + * + */ + var load_css = function (name) { + var link = document.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = requirejs.toUrl(name, 'css'); + document.getElementsByTagName("head")[0].appendChild(link); + }; + + /** + * Initialize extension + * + */ + var load_extension = function () { + // first, check which view we're in, in order to decide whether to load + var conf_sect; + if (Jupyter.notebook) { + // we're in notebook view + conf_sect = Jupyter.notebook.config; + } + else if (Jupyter.editor) { + // we're in file-editor view + conf_sect = new configmod.ConfigSection('notebook', {base_url: Jupyter.editor.base_url}); + conf_sect.load(); + } + else { + // we're some other view like dashboard, terminal, etc, so bail now + return; + } + + load_css('codemirror/addon/fold/foldgutter.css'); + /* change default gutter width */ + load_css( './foldgutter.css'); + + conf_sect.loaded + .then(function () { update_params(conf_sect.data); }) + .then(on_config_loaded); + + if (Jupyter.notebook) { + /* require our additional custom codefolding modes before initialising fully */ + requirejs(['./firstline-fold', './magic-fold', './blockcomment-fold'], function () { + if (Jupyter.notebook._fully_loaded) { + setTimeout(function () { + console.log('Codefolding: Wait for', params.init_delay, 'ms'); + initExistingCells(); + }, params.init_delay); + } + else { + events.one('notebook_loaded.Notebook', initExistingCells); + } + }); + } + else { + activate_cm_folding(Jupyter.editor.codemirror); + setTimeout(function () { + console.log('Codefolding: Wait for', params.init_delay, 'ms'); + Jupyter.editor.codemirror.refresh(); + }, params.init_delay); + } + }; + + return {load_ipython_extension : load_extension}; +}); diff --git a/.local/share/jupyter/nbextensions/codefolding/readme.md b/.local/share/jupyter/nbextensions/codefolding/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..fa506f29e8688c4491858091ef40dc7db40d26c2 --- /dev/null +++ b/.local/share/jupyter/nbextensions/codefolding/readme.md @@ -0,0 +1,105 @@ +Codefolding +=========== + +This extension adds codefolding functionality from CodeMirror to a codecell. + +In edit mode, clicking on the triangle in the gutter (left margin of codecell) or typing the codefolding hotkey +(default is `Alt+F`), folds the code. +In command mode, the folding hotkey relates to the first line of the codecell. + +See the examples below. The folding status is saved in the cell metadata of the notebook, so reloading of a notebook will restore the folding view. + +Supported modes +--------------- + +Three different folding modes are supported: + + +### Indent Folding + +In the image below, the Codefolding extension detects unfolded, Python-style indentations: + +![Unfolded](codefolding_indent_unfolded.png) + +The unfolded code above can be folded like this: + +![](codefolding_indent_folded_1.png) + +or this: + +![](codefolding_indent_folded_2.png) + + +### Bracket Folding + +Other languages like Javascript use brackets to designate code blocks. Codefolding is supported for Javascript in using the `%%javascript` magic in a codecell. + + +### Firstline Comment Folding + +Allows collapsing of Python code cells to a single comment line. This is useful for long codecells. The algorithm simply looks for a comment in the first line and allows folding in the rest of the cell. + +![](codefolding_firstline_unfolded.png) + +The code above can be folded like this: + +![](codefolding_firstline_folded.png) + + +### Magics Folding + +If you specify a magic in the first line of a cell, it can be folded, too. + +![](magic-unfolded.png) + +Folded: + +![](magic-folded.png) + + + +Installation +------------ + +Note that there are two extensions: one for the notebook interface (`notebook:codefolding/main`), +and one for the editor (`edit:codefolding/edit`) which have slightly different installation syntax: + +```bash +jupyter nbextension enable codefolding/main +jupyter nbextension enable --section edit codefolding/edit +``` + + +Internals +--------- + +When saving a notebook, the folding information is saved in the metadata of +each codecell. +The number of the folding start line (beginning with 0) is stored in an array: + +```javascript +cell.metadata.code_folding = [ 3, 20, 33 ] +``` + +When reloading the notebook, the folding status is restored. + +The codefolding hotkey can be customized using the notebook extensions configurator. +The settings are stored as `"codefolding_hotkey": "alt-f"` in `the notebook.json` configuration file. + + +Exporting +--------- + +To export a notebook containing folded cells, you will need to apply a custom +preprocessor for nbconvert. +The preprocessor is located in +`jupyter_contrib_nbextensions.nbconvert_support.pre_codefolding`. + +The preprocessor is installed when you install the +`jupyter_contrib_nbextensions` package. +To activate the preprocessor manually, +add the following lines to `jupyter_nbconvert_config.py`: + +```python +Exporter.preprocessors += ['jupyter_contrib_nbextensions.nbconvert_support.CodeFoldingPreprocessor'] +``` diff --git a/.local/share/jupyter/nbextensions/codemirror_mode_extensions/codemirror_mode_extensions.yaml b/.local/share/jupyter/nbextensions/codemirror_mode_extensions/codemirror_mode_extensions.yaml new file mode 100644 index 0000000000000000000000000000000000000000..527864633bfac9559eb9d37b67259fa0bb832ae2 --- /dev/null +++ b/.local/share/jupyter/nbextensions/codemirror_mode_extensions/codemirror_mode_extensions.yaml @@ -0,0 +1,7 @@ +Type: Jupyter Notebook Extension +Name: CodeMirror mode extensions +Description: | + Extends some CodeMirror modes with extra features. Currently just adds + support for comment/uncomment and folding for octave/MATLAB mode. +Main: main.js +Compatibility: 4.x diff --git a/.local/share/jupyter/nbextensions/collapsible_headings/collapsible_headings.yaml b/.local/share/jupyter/nbextensions/collapsible_headings/collapsible_headings.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ff482c88351d0ef4bb6d1c4ba2fa138a4650fa94 --- /dev/null +++ b/.local/share/jupyter/nbextensions/collapsible_headings/collapsible_headings.yaml @@ -0,0 +1,129 @@ +Type: Jupyter Notebook Extension +Compatibility: 4.x, 5.x +Name: Collapsible Headings +Main: main.js +Description: "Allows notebook to have collapsible sections, separated by headings" +Link: readme.md +Icon: icon.png +Parameters: + +- name: collapsible_headings.add_button + description: Add a toolbar button to collapse the closest header cell + input_type: checkbox + default: false + +- name: collapsible_headings.add_all_cells_button + description: Add a toolbar button to collapse/uncollapse all header cells + input_type: checkbox + default: false + +- name: collapsible_headings.add_insert_header_buttons + description: Add toolbar buttons to insert heading cells above/below the selected cell + input_type: checkbox + default: false + +- name: collapsible_headings.use_toggle_controls + description: Add a control in each heading cell's input prompt to collapse/uncollapse it + input_type: checkbox + default: true + +- name: collapsible_headings.toggle_color + description: Color for the toggle control icon + input_type: color + default: '#aaaaaa' + +- name: collapsible_headings.toggle_closed_icon + description: font-awesome class for the toggle control icon on collapsed headings + default: fa-caret-right + +- name: collapsible_headings.toggle_open_icon + description: font-awesome class for the toggle control icon on uncollapsed (expanded) headings + default: fa-caret-down + +- name: collapsible_headings.make_toggle_controls_buttons + description: "Make the toggle control into a button (if false, it's just an icon)" + input_type: checkbox + default: false + +- name: collapsible_headings.size_toggle_controls_by_level + description: Adjust the size of the toggle controls to match their heading levels + input_type: checkbox + default: true + +- name: collapsible_headings.show_section_brackets + description: show Mathematica-style brackets around each collapsible section + input_type: checkbox + default: false + +- name: collapsible_headings.section_bracket_width + description: 'Width, in pixels, of the Mathematica-style brackets around sections' + input_type: number + min: 2 + max: 100 + default: 10 + +- name: collapsible_headings.show_ellipsis + description: show a gray bracketed ellipsis at the end of collapsed heading cells + input_type: checkbox + default: true + +- name: collapsible_headings.use_shortcuts + description: Add command-mode keyboard shortcuts to collapse/uncollapse the selected heading cell + input_type: checkbox + default: true + +- name: collapsible_headings.shortcuts.collapse + description: Command-mode shortcut to collapse the selected heading cell + input_type: hotkey + default: left + +- name: collapsible_headings.shortcuts.uncollapse + description: Command-mode shortcut to uncollapse (expand) the selected heading cell + input_type: hotkey + default: right + +- name: collapsible_headings.shortcuts.collapse_all + description: Command-mode shortcut to collapse all heading cells + input_type: hotkey + default: ctrl-shift-left + +- name: collapsible_headings.shortcuts.uncollapse_all + description: Command-mode shortcut to uncollapse (expand) all heading cells + input_type: hotkey + default: ctrl-shift-right + +- name: collapsible_headings.shortcuts.select + description: Command-mode shortcut to select all cells in the selected heading cell's section + input_type: hotkey + default: shift-right + +- name: collapsible_headings.shortcuts.insert_above + description: Command-mode shortcut to insert a heading cell above the selected cell + input_type: hotkey + default: shift-a + +- name: collapsible_headings.shortcuts.insert_below + description: Command-mode shortcut to insert a heading cell below the selected cell's section + input_type: hotkey + default: shift-b + +- name: collapsible_headings.select_reveals + description: "By default, selecting a whole section also expands the section to reveal its last cell. Set this option to false to disable the expansion." + input_type: checkbox + default: true + +- name: collapsible_headings.collapse_to_match_toc + description: | + Collapse/uncollapse notebook sections when the ToC2 nbextension is used to + collapse/uncollapse sections in the table of contents. For the inverse + behaviour, see ToC2's configuration + input_type: checkbox + default: false + +- name: collapsible_headings.indent_px + description: | + Shift the collapsible heading controls left by this many pixels per level, + such that more significant headings (lower levels) appear further to the + left + input_type: number + default: 8 diff --git a/.local/share/jupyter/nbextensions/collapsible_headings/icon.png b/.local/share/jupyter/nbextensions/collapsible_headings/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ee07c9e6a0cafcd3fda79d54974b4919f8abf9fc Binary files /dev/null and b/.local/share/jupyter/nbextensions/collapsible_headings/icon.png differ diff --git a/.local/share/jupyter/nbextensions/comment-uncomment/comment-uncomment.yaml b/.local/share/jupyter/nbextensions/comment-uncomment/comment-uncomment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..62bc0886fc841ed63c014e31f2708bbe286adb1c --- /dev/null +++ b/.local/share/jupyter/nbextensions/comment-uncomment/comment-uncomment.yaml @@ -0,0 +1,16 @@ +Type: IPython Notebook Extension +Compatibility: 4.x, 5.x +Name: Comment/Uncomment Hotkey +Main: main.js +Description: add new configurable hotkey binding to toggle comments +Icon: icon.png +Link: readme.md +Parameters: +- name: comment_uncomment_keybinding + description: keybinding for toggling comments + input_type: hotkey + default: alt-c +- name: comment_uncomment_indent + description: indent comment at current indent level instead of at beginning of line + default: false + input_type: checkbox diff --git a/.local/share/jupyter/nbextensions/contrib_nbextensions_help_item/README.md b/.local/share/jupyter/nbextensions/contrib_nbextensions_help_item/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d4ce0987af19bbe98160699da6bffeac6b88290d --- /dev/null +++ b/.local/share/jupyter/nbextensions/contrib_nbextensions_help_item/README.md @@ -0,0 +1,6 @@ +Help menu entry +=============== + +The `contrib_nbextensions_help_item` is a tiny nbextension that just adds an +item to the notebook's help menu, pointing to the docs at readthedocs: +[jupyter_contrib_nbextensions.readthedocs.io](https://jupyter_contrib_nbextensions.readthedocs.io) diff --git a/.local/share/jupyter/nbextensions/contrib_nbextensions_help_item/main.js b/.local/share/jupyter/nbextensions/contrib_nbextensions_help_item/main.js new file mode 100644 index 0000000000000000000000000000000000000000..991c907dc84fa11291ec6f04ff8ef66e8fea115e --- /dev/null +++ b/.local/share/jupyter/nbextensions/contrib_nbextensions_help_item/main.js @@ -0,0 +1,35 @@ +// Small extension to add an help menu pointing +// to jupyter_contrib_nbextensions at readthedocs. + +define(['jquery', 'base/js/namespace'], function($, Jupyter) { + "use strict"; + + function add_help_menu_item() { + + if ($('#jupyter_contrib_nbextensions_help').length > 0) { + return; + } + var menu_item = $('
  • ') + .append( + $('') + .html('Jupyter-contrib
    nbextensions') + .attr('title', 'Jupyter_contrib_nbextensions documentation') + .attr('id', "jupyter_contrib_nbextensions_help") + .attr('href', 'http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/') + .attr('target', "_blank") + .append( + $('') + .addClass('fa fa-external-link menu-icon pull-right') + )) + menu_item.insertBefore($($("#help_menu > .divider")[1])) + } + + + var load_ipython_extension = function() { + add_help_menu_item(); + }; + + return { + load_ipython_extension: load_ipython_extension + }; +}); diff --git a/.local/share/jupyter/nbextensions/datestamper/main.js b/.local/share/jupyter/nbextensions/datestamper/main.js new file mode 100644 index 0000000000000000000000000000000000000000..8060ca136592edbec85a9d4cbac553f39a6e8669 --- /dev/null +++ b/.local/share/jupyter/nbextensions/datestamper/main.js @@ -0,0 +1,42 @@ +define([ + "base/js/namespace", + "jquery" +], function (IPython, $) { + "use strict"; + + var padZero = function(val){ + return ("0" + val).slice(-2); + }; + + var datestring = function(){ + var d = new Date(); + return ( + d.getFullYear() + "-" + padZero(d.getMonth() + 1) + "-" + padZero(d.getDate()) + + " " + padZero(d.getHours()) + ":" + padZero(d.getMinutes()) + ":" + padZero(d.getSeconds()) + ); + }; + + var datestamp = function(){ + var cell = IPython.notebook.get_selected_cell(); + var do_render = !((cell.cell_type === "raw") || (cell.cell_type === "code")); + if(do_render) cell.unrender(); + cell.code_mirror.focus(); + cell.code_mirror.doc.replaceSelection(datestring() + " ", "end"); + if(do_render) cell.edit_mode(); + }; + + var load_ipython_extension = function () { + IPython.toolbar.add_buttons_group([ + IPython.keyboard_manager.actions.register ({ + help : 'insert datestamp', + icon : 'fa-calendar', + handler: datestamp + }, 'insert-datestamp', 'datestamp') + ]); + }; + + var extension = { + load_ipython_extension : load_ipython_extension, + }; + return extension; +}); diff --git a/.local/share/jupyter/nbextensions/datestamper/main.yaml b/.local/share/jupyter/nbextensions/datestamper/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e45670cd0598146746d0e3a556cb61e05bce9791 --- /dev/null +++ b/.local/share/jupyter/nbextensions/datestamper/main.yaml @@ -0,0 +1,7 @@ +Type: IPython Notebook Extension +Name: datestamper +Description: 'adds a toolbar button which pastes the current time & date into the current cell' +Icon: icon.png +Main: main.js +Compatibility: 4.x, 5.x +Link: readme.md diff --git a/.local/share/jupyter/nbextensions/equation-numbering/icon.png b/.local/share/jupyter/nbextensions/equation-numbering/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..23d0cbeb5589707e1d8a44dbf135e935f121fcec Binary files /dev/null and b/.local/share/jupyter/nbextensions/equation-numbering/icon.png differ diff --git a/.local/share/jupyter/nbextensions/equation-numbering/readme.md b/.local/share/jupyter/nbextensions/equation-numbering/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..b0de9fcf7150ac0273bcc01dc91415a6a481c9e8 --- /dev/null +++ b/.local/share/jupyter/nbextensions/equation-numbering/readme.md @@ -0,0 +1,34 @@ +MathJax Equation Numbering +=========== + +Enable automatic equation numbering and reset numbering upon pressing toolbar button ![](button.png). + + +A LaTeX equation like: +```TeX +\begin{equation} +E = F \cdot s +\end{equation} +``` + +generates the numbered equation: +![](icon.png) + +Internals +--------- + +Equation numbering is activated this way: +```Javascript +MathJax.Hub.Config({ + TeX: { equationNumbers: { autoNumber: "AMS" } } +}); +``` + +Equation numbers are reset and math equations rerendered using this code: +```Javascript +MathJax.Hub.Queue( + ["resetEquationNumbers", MathJax.InputJax.TeX], + ["PreProcess", MathJax.Hub], + ["Reprocess", MathJax.Hub] +); +``` diff --git a/.local/share/jupyter/nbextensions/execution_dependencies/execution_dependencies.yml b/.local/share/jupyter/nbextensions/execution_dependencies/execution_dependencies.yml new file mode 100644 index 0000000000000000000000000000000000000000..02ebd940308a971176257f32d650f4fd88da4e60 --- /dev/null +++ b/.local/share/jupyter/nbextensions/execution_dependencies/execution_dependencies.yml @@ -0,0 +1,9 @@ +Type: Jupyter Notebook Extension +Compatibility: 4.x, 5.x +Name: Execution Dependencies +Main: execution_dependencies.js +Link: README.md +Description: | + Introduce tag annotations to identify each cell and indicate a dependency on others. + Upon running a cell, its dependencies are run first to prepare all dependencies. + Then the cell triggered by the user is run as soon as all its dependencies are met. diff --git a/.local/share/jupyter/nbextensions/keyboard_shortcut_editor/README.md b/.local/share/jupyter/nbextensions/keyboard_shortcut_editor/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c971675425c9af6bba280420dde706b6a5e43847 --- /dev/null +++ b/.local/share/jupyter/nbextensions/keyboard_shortcut_editor/README.md @@ -0,0 +1,130 @@ +Keyboard shortcut editor +======================== + +This extension allows you to edit or remove the default notebook keyboard +shortcuts, or create your own new ones. + +Currently, this extension supports the editing of any shortcut provided by +Jupyter, with the exception of those provided by the CodeMirror editors, since +they use a different API. + +To edit your keyboard shortcuts, open the keyboard shortcuts help dialog, +either by pressing h in command mode, or by selecting +`help > keyboard shortcuts` from the menu: + +![keyboard shortcuts menu item](readme_menu_item.png) + +When the extension has been loaded, each shortcut in the dialog will show a +small dropdown menu next to it, with items to remove or edit the shortcut: + +![keyboard shortcut edit dropdown](readme_dropdown.png) + +Clicking the edit item opens a second modal dialog, with a text input. While +the input has focus, you can press keys to form your combination. The reset +button (the curly arrow to the left hand side) allows you to clear any keys you +may input accidentally. + +![the shortcut editor dialog](readme_shortcut_editor_blank.png) +![the shortcut editor dialog](readme_shortcut_editor_success.png) + +If you'd like to disable an existing shortcut, you can click the 'Disable' +button on the dropdown. This will move the shortcut into a new section on the +dialog headed 'disabled'. You can click the reset button next to disabled +shortcuts to re-enable them: + +![re-enabling a disabled shortcut](readme_reset_disabled.png) + +You can create new custom keyboard shortcuts using the link at the base of the +shortcut list for each mode: + +![add a new keyboard shortcut](readme_add_new_link.png) + +This opens a dialog similar to the editor, with the addition of a select box +from which you can select the action which will be called: + +![selecting an action for a new keyboard shortcut](readme_add_new_select_action.png) + + +Limitations: problem shortcuts +------------------------------ + +Since this editor uses the same key-identification method as the notebook, +anything you can get it to recognise should (?!) work as a notebook shortcut, +even if it gets represented by the editor differently to the letters on your +actual, physical, keyboard. However, bear in mind that key identification is +not perfect, (this is a problem on the web in general), so it's possible that +some combinations may not be identified by Jupyter at all. In such cases, the +editor should notify you: + +![an unrecognised keypress](readme_undefined_key.png) + +In addition, the handling of shortcuts including commas is currently +compromised to the extent that they don't really work properly, so the editor +also won't accept anything with a comma in it: + +![commas don't work properly!](readme_comma.png) + +The dialog will also not accept a shortcut that would conflict with one which +already exists: + +![conflicting keyboard shortcuts are not accepted](readme_conflict.png) + +If the conflicting shortcut is provided by Jupyter rather than CodeMirror, you +can of course disable it to prevent the conflict occurring. + + +Internals +--------- + +The extension stores a record of the edits in use in the config, as a list +of objects for each mode. Those without a `to` key denote shortcuts to disable, +while those without a `from` key denote new shortcuts. For example: + +```javascript +// the config object with section name 'notebook' at the base URL +{ + "kse_rebinds": { + // command-mode rebindings + 'command': [ + { // disable the default 'space' shortcut, which used to scroll the notebook down + from: "space", + action_name: "jupyter-notebook:scroll-notebook-down" + }, + { // create a new shortcut 't,t' to trust the notebook + action_name: "jupyter-notebook:trust-notebook", + to: "t,t" + }, + { // change the default save-notebook shortcut from 's' to 'shift-s' + action_name: "jupyter-notebook:save-notebook", + to: "shift-s", + from: "s" + } + ], + // edit-mode rebindings: + "edit": [ + { // disable the default edit-mode binding which switches to command mode + action_name: "jupyter-notebook:enter-command-mode", + from: "ctrl-m" + } + ] + }, + // other config keys may be present in this file! +} +``` + +The extension applies the shortcut edits when it is loaded, and in addition to +any shortcut registered subsequently, as detailed below. + + +Patches +------- + +The extension applies patches to two Jupyter class prototypes. +The method `ShortcutManager.prototype.add_shortcut` from `base/js/keyboard`, +is patched to ensure any appropriate edits are applied to any shortcuts which +get registered after the extension is loaded, for example by other notebook +extensions. + +The `QuickHelp.prototype.build_command_help` and +`QuickHelp.prototype.build_edit_help` methods from `notebook/js/quickhelp`, are +patched to insert the dropdown menus, disabled shortcuts and other links. diff --git a/.local/share/jupyter/nbextensions/keyboard_shortcut_editor/readme_add_new_link.png b/.local/share/jupyter/nbextensions/keyboard_shortcut_editor/readme_add_new_link.png new file mode 100644 index 0000000000000000000000000000000000000000..60bfd1181b0f4b0d0a56baa2f280c3da3e47ee69 Binary files /dev/null and b/.local/share/jupyter/nbextensions/keyboard_shortcut_editor/readme_add_new_link.png differ diff --git a/.local/share/jupyter/nbextensions/keyboard_shortcut_editor/readme_shortcut_editor_blank.png b/.local/share/jupyter/nbextensions/keyboard_shortcut_editor/readme_shortcut_editor_blank.png new file mode 100644 index 0000000000000000000000000000000000000000..d80054017a2b79c926a34d39cdf7775af48cb9b9 Binary files /dev/null and b/.local/share/jupyter/nbextensions/keyboard_shortcut_editor/readme_shortcut_editor_blank.png differ diff --git a/.local/share/jupyter/nbextensions/limit_output/main.js b/.local/share/jupyter/nbextensions/limit_output/main.js new file mode 100644 index 0000000000000000000000000000000000000000..28d86d853966978c0c639b28062440c6605d6340 --- /dev/null +++ b/.local/share/jupyter/nbextensions/limit_output/main.js @@ -0,0 +1,133 @@ +// Restrict output in a codecell to a maximum length + +define([ + 'base/js/namespace', + 'notebook/js/outputarea', + 'notebook/js/codecell', +], function( + Jupyter, + oa, + cc +) { + "use strict"; + + // define default values for config parameters + var params = { + // maximum number of characters the output area is allowed to print + limit_output : 10000, + limit_stream : true, + limit_execute_result : true, + limit_display_data : false, + // message to print when output is limited + limit_output_message : 'limit_output extension: Maximum message size of {limit_output_length} exceeded with {output_length} characters' + }; + + // to be called once config is loaded, this updates default config vals + // with the ones specified by the server's config file + var update_params = function() { + var config = Jupyter.notebook.config; + for (var key in params) { + if (config.data.hasOwnProperty(key) ){ + params[key] = config.data[key]; + } + } + }; + + function is_finite_number (n) { + n = parseFloat(n); + return !isNaN(n) && isFinite(n); + } + + var initialize = function () { + update_params(); + // sometimes limit_output metadata val can get stored as a string + params.limit_output = parseFloat(params.limit_output); + var old_handle_output = oa.OutputArea.prototype.handle_output; + oa.OutputArea.prototype.handle_output = function (msg) { + var handled_msg_types = ['stream', 'execute_result', 'display_data']; + if (handled_msg_types.indexOf(msg.header.msg_type) < 0) { + return old_handle_output.apply(this, arguments); + } + else { + // get MAX_CHARACTERS from cell metadata if present, otherwise param + //msg.header.msg_type + var MAX_CHARACTERS = params.limit_output; + var cell_metadata = this.element.closest('.cell').data('cell').metadata; + if (is_finite_number(cell_metadata.limit_output)) { + MAX_CHARACTERS = parseFloat(cell_metadata.limit_output); + } + + // read the length of already-appended outputs from our data + var count = this.element.data('limit_output_count') || 0; + // update count with the length of this message + var old_count = count; + if (msg.header.msg_type === "stream" && params.limit_stream) { + count += String(msg.content.text).length; + } + else { + if ((msg.header.msg_type === "execute_result" && params.limit_execute_result) || + (msg.header.msg_type === "display_data" && params.limit_display_data)) { + count += Math.max( + (msg.content.data['text/plain'] === undefined) ? 0 : String(msg.content.data['text/plain']).length, + (msg.content.data['text/html'] === undefined) ? 0 : String(msg.content.data['text/html']).length + ); + } + + } + // save updated count + this.element.data('limit_output_count', count); + + if (count <= MAX_CHARACTERS) { + return old_handle_output.apply(this, arguments); + } + // if here, we'd exceed MAX_CHARACTERS with addition of this message. + if (old_count <= MAX_CHARACTERS) { + // Apply truncated portion of this message + var to_add = MAX_CHARACTERS - old_count; + if (msg.header.msg_type === "stream") { + msg.content.text = msg.content.text.substr(0, to_add); + } + else { + if (msg.content.data['text/plain'] !== undefined) { + msg.content.data['text/plain'] = msg.content.data['text/plain'].substr(0, to_add); + } + if (msg.content.data['text/html'] !== undefined) { + msg.content.data['text/html'] = msg.content.data['text/html'].substr(0, to_add); + } + } + old_handle_output.apply(this, arguments); + + // display limit notification messages + console.log( + "limit_output: Maximum message size of", MAX_CHARACTERS, + "exceeded with", count, "characters. Further output muted." + ); + // allow simple substitutions for output length for quick debugging + var limitmsg = params.limit_output_message.replace("{message_type}", msg.header.msg_type) + .replace("{limit_output_length}", MAX_CHARACTERS) + .replace("{output_length}", count); + this.append_output({ + "output_type": "display_data", + "metadata": {}, // included to avoid warning + "data": {"text/html": limitmsg} + }); + } + } + }; + + var old_clear_output = oa.OutputArea.prototype.clear_output; + oa.OutputArea.prototype.clear_output = function () { + // reset counter on execution. + this.element.data('limit_output_count', 0); + return old_clear_output.apply(this, arguments); + }; + }; + + var load_ipython_extension = function() { + return Jupyter.notebook.config.loaded.then(initialize); + }; + + return { + load_ipython_extension : load_ipython_extension + }; +}); diff --git a/.local/share/jupyter/nbextensions/load_tex_macros/load_tex_macros.yaml b/.local/share/jupyter/nbextensions/load_tex_macros/load_tex_macros.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7e80e24f364e130fb3b9618c5726d7f0b9d28d15 --- /dev/null +++ b/.local/share/jupyter/nbextensions/load_tex_macros/load_tex_macros.yaml @@ -0,0 +1,7 @@ +Type: Jupyter Notebook Extension +Name: Load TeX macros +Description: This extension automatically loads a set of latex commands from the file latexdefs.tex when a notebook is opened. +Link: readme.md +Icon: icon.png +Main: main.js +Compatibility: 4.x, 5.x diff --git a/.local/share/jupyter/nbextensions/navigation-hotkeys/main.js b/.local/share/jupyter/nbextensions/navigation-hotkeys/main.js new file mode 100644 index 0000000000000000000000000000000000000000..eeea36ca4245e65c273c622730e0adb2d4cd337d --- /dev/null +++ b/.local/share/jupyter/nbextensions/navigation-hotkeys/main.js @@ -0,0 +1,286 @@ +// add custom shortcuts + +define([ + 'base/js/namespace', + 'jquery' +], function(Jupyter, $) { + "use strict"; + + // define default values for config parameters + var params = { + toggle_enable_edit_shortcuts : true, + toggle_enable_command_shortcuts : true, + toggle_enable_esc_shortcut : true, + toggle_enable_enter_shortcuts : true, + }; + + // updates default params with any specified in the server's config + var update_params = function() { + var config = Jupyter.notebook.config; + for (var key in params){ + if (config.data.hasOwnProperty(key) ){ + params[key] = config.data[key]; + } + } + }; + + var add_command_shortcuts = { + 'home' : { + help : 'Go to top', + help_index : 'ga', + handler : function() { + Jupyter.notebook.select(0); + Jupyter.notebook.scroll_to_top(); + return false; + } + }, + + 'end' : { + help : 'Go to bottom', + help_index : 'ga', + handler : function() { + var ncells = Jupyter.notebook.ncells(); + Jupyter.notebook.select(ncells-1); + Jupyter.notebook.scroll_to_bottom(); + return false; + } + }, + + 'pageup' : { + help : 'Move cells page up', + help_index : 'gu', + handler : function() { + var wh = 0.6 * $(window).height(); + var cell = Jupyter.notebook.get_selected_cell(); + var h = 0; + /* loop until we have enough cells to span the size of the notebook window (= one page) */ + do { + h += cell.element.height(); + Jupyter.notebook.select_prev(); + cell = Jupyter.notebook.get_selected_cell(); + } while ( h < wh ); + var cp = cell.element.position(); + var sp = $('body').scrollTop(); + if ( cp.top < sp) { + Jupyter.notebook.scroll_to_cell(Jupyter.notebook.get_selected_index(), 0); + } + cell.focus_cell(); + return false; + } + }, + + 'pagedown' : { + help : 'Move cells page down', + help_index : 'gd', + handler : function() { + + /* jump to bottom if we are already in the last cell */ + var ncells = Jupyter.notebook.ncells(); + if ( Jupyter.notebook.get_selected_index()+1 == ncells) { + Jupyter.notebook.scroll_to_bottom(); + return false; + } + + var wh = 0.6*$(window).height(); + var cell = Jupyter.notebook.get_selected_cell(); + var h = 0; + + /* loop until we have enough cells to span the size of the notebook window (= one page) */ + do { + h += cell.element.height(); + Jupyter.notebook.select_next(); + cell = Jupyter.notebook.get_selected_cell(); + } while ( h < wh ); + cell.focus_cell(); + return false; + } + } + + }; + + var add_edit_shortcuts = { + 'alt-subtract' : { + help : 'Merge cell with previous cell', + help_index : 'eb', + handler : function() { + var i = Jupyter.notebook.get_selected_index(); + if (i > 0) { + var l = Jupyter.notebook.get_cell(i-1).code_mirror.lineCount(); + Jupyter.notebook.merge_cell_above(); + Jupyter.notebook.get_selected_cell().code_mirror.setCursor(l,0); + } + } + }, + 'alt-n' : { + help : 'Toggle line numbers', + help_index : 'xy', + handler : function() { + var cell = Jupyter.notebook.get_selected_cell(); + cell.toggle_line_numbers(); + return false; + } + }, + 'pagedown' : { + help : 'Page down', + help_index : 'xy', + handler : function() { + + var ic = Jupyter.notebook.get_selected_index(); + var cells = Jupyter.notebook.get_cells(); + var i, h=0; + for (i=0; i < ic; i ++) { + h += cells[i].element.height(); + } + var cur = cells[ic].code_mirror.getCursor(); + h += cells[ic].code_mirror.defaultTextHeight() * cur.line; + Jupyter.notebook.element.animate({scrollTop:h}, 0); + return false; + } + }, + 'pageup' : { + help : 'Page up', + help_index : 'xy', + handler : function() { + + var ic = Jupyter.notebook.get_selected_index(); + var cells = Jupyter.notebook.get_cells(); + var i, h=0; + for (i=0; i < ic; i ++) { + h += cells[i].element.height(); + } + var cur =cells[ic].code_mirror.getCursor(); + h += cells[ic].code_mirror.defaultTextHeight() * cur.line; + Jupyter.notebook.element.animate({scrollTop:h}, 0); + return false; + } + }, + 'ctrl-y' : { + help : 'Toggle markdown/code', + handler : function() { + var cell = Jupyter.notebook.get_selected_cell(); + var cur = cell.code_mirror.getCursor(); + if (cell.cell_type == 'code') { + Jupyter.notebook.command_mode(); + Jupyter.notebook.to_markdown(); + Jupyter.notebook.edit_mode(); + cell = Jupyter.notebook.get_selected_cell(); + cell.code_mirror.setCursor(cur); + } else if (cell.cell_type == 'markdown') { + Jupyter.notebook.command_mode(); + Jupyter.notebook.to_code(); + Jupyter.notebook.edit_mode(); + cell = Jupyter.notebook.get_selected_cell(); + cell.code_mirror.setCursor(cur); + } + return false; + } + } + }; + + var add_edit_enter_shortcuts = { + 'shift-enter' : { + help : 'Run cell and select next in edit mode', + help_index : 'bb', + handler : function() { + Jupyter.notebook.execute_cell_and_select_below(); + var rendered = Jupyter.notebook.get_selected_cell().rendered; + var ccell = Jupyter.notebook.get_selected_cell().cell_type; + if (rendered === false || ccell === 'code') Jupyter.notebook.edit_mode(); + return false; + } + }, + 'ctrl-enter' : { + help : 'Run selected cell stay in edit mode', + help_index : 'bb', + handler : function() { + var cell = Jupyter.notebook.get_selected_cell(); + var mode = cell.mode; + cell.execute(); + if (mode === "edit") Jupyter.notebook.edit_mode(); + return false; + } + } + }; + + var initialize = function() { + // Update default parameters + update_params(); + + var action; + var prefix = 'navigation_hotkeys'; + var action_name; + var action_name_spaces; + var action_full_name; + var all_commands_combined = [add_command_shortcuts, add_edit_enter_shortcuts, add_edit_shortcuts]; + + + // register all commands if one of the keybindings is not loaded so commands still available + for (let i = 0; i < all_commands_combined.length; i++){ + for (var key in all_commands_combined[i]){ + // check if the property/key is defined in the object itself, not in parent + if (all_commands_combined[i].hasOwnProperty(key)) { + action = all_commands_combined[i][key]; + action_name_spaces = all_commands_combined[i][key]['help']; + action_name = action_name_spaces.replace(/ /g,"-").toLowerCase(); + action_full_name = Jupyter.keyboard_manager.actions.register(action, action_name, prefix); + }; + }; + }; + + if (params.toggle_enable_command_shortcuts) { + for (var key in add_command_shortcuts) { + // check if the property/key is defined in the object itself, not in parent + if (add_command_shortcuts.hasOwnProperty(key)) { + action = add_command_shortcuts[key]; + action_name_spaces = add_command_shortcuts[key]['help']; + action_name = action_name_spaces.replace(/ /g,"-").toLowerCase(); + action_full_name = prefix + ":" + action_name; + Jupyter.keyboard_manager.command_shortcuts.add_shortcut( + key, action_full_name); + } + }; + if (params.toggle_enable_esc_shortcut) { + Jupyter.keyboard_manager.command_shortcuts.add_shortcut( + 'Esc','jupyter-notebook:enter-edit-mode'); + } + }; + + if (params.toggle_enable_edit_shortcuts) { + for (var key in add_edit_shortcuts) { + // check if the property/key is defined in the object itself, not in parent + if (add_edit_shortcuts.hasOwnProperty(key)) { + action = add_edit_shortcuts[key]; + action_name_spaces = add_edit_shortcuts[key]['help']; + action_name = action_name_spaces.replace(/ /g,"-").toLowerCase(); + action_full_name = prefix + ":" + action_name; + Jupyter.keyboard_manager.edit_shortcuts.add_shortcut(key, action_full_name); + } + }; + if (params.toggle_enable_enter_shortcuts) { + for (var key in add_edit_enter_shortcuts) { + // check if the property/key is defined in the object itself, not in parent + if (add_edit_enter_shortcuts.hasOwnProperty(key)) { + action = add_edit_enter_shortcuts[key]; + action_name_spaces = add_edit_enter_shortcuts[key]['help']; + action_name = action_name_spaces.replace(/ /g,"-").toLowerCase(); + action_full_name = prefix + ":" + action_name; + Jupyter.keyboard_manager.edit_shortcuts.add_shortcut( + key, action_full_name); + } + }; + }; + Jupyter.keyboard_manager.edit_shortcuts.add_shortcut( + 'alt-add','jupyter-notebook:split-cell-at-cursor'); + }; + + }; + + var load_ipython_extension = function() { + return Jupyter.notebook.config.loaded.then(initialize); + }; + + var extension = { + load_ipython_extension : load_ipython_extension + }; + return extension; +}); diff --git a/.local/share/jupyter/nbextensions/nbTranslate/main.js b/.local/share/jupyter/nbextensions/nbTranslate/main.js new file mode 100644 index 0000000000000000000000000000000000000000..dfd79370d38dd6570beb9f5135b52b2832aef5d3 --- /dev/null +++ b/.local/share/jupyter/nbextensions/nbTranslate/main.js @@ -0,0 +1,136 @@ +// Copyright (c) Jupyter-Contrib Team. +// Distributed under the terms of the Modified BSD License. +// Author: Jean-François Bercher + +define([ + 'module', + 'require', + 'jquery', + 'base/js/namespace', + './nbTranslate', + './mutils', +], function( + module, + requirejs, + $, + Jupyter, + nbt, + mutils +) { + 'use strict'; + + var sourceLang; + var targetLang; + var displayLangs; + var useGoogleTranslate; + + var add_edit_shortcuts = {}; + var log_prefix = '[' + module.id + '] '; + + // default config (updated on nbextension load) + var conf = { + hotkey: 'alt-t', + sourceLang: 'en', + targetLang: 'fr', + displayLangs: ['*'], + langInMainMenu: true, + useGoogleTranslate: true + } + + + function initialize(conf) { + Jupyter.notebook.config.loaded.then(function config_loaded_callback() { + // config may be specified at system level or at document level. + // first, update defaults with config loaded from server + conf = $.extend(false, {}, conf, Jupyter.notebook.config.data.nbTranslate); + // then update cfg with any found in current notebook metadata + // and save in nb metadata (then can be modified per document) + conf = Jupyter.notebook.metadata.nbTranslate = $.extend(false, {}, conf, + Jupyter.notebook.metadata.nbTranslate); + //conf.displayLangs = Jupyter.notebook.metadata.nbTranslate.displayLangs = $.makeArray($.extend(true, {}, conf.displayLangs, Jupyter.notebook.metadata.nbTranslate.displayLangs)); + // other initializations + sourceLang = conf.sourceLang; + targetLang = conf.targetLang; + displayLangs = conf.displayLangs; + useGoogleTranslate = conf.useGoogleTranslate; + // then + translateHotkey(conf); + showToolbar(); + main_function(conf); + buildTranslateToolbar(); + }) + return conf + } + + + function showToolbar() { + if ($('#showToolbar').length == 0) { + $(Jupyter.toolbar.add_buttons_group([ + Jupyter.keyboard_manager.actions.register({ + 'help' : 'Translate current cell', + 'icon' : 'fa-language', + 'handler': translateCurrentCell, + }, 'translate-cell', 'nbTranslate'), + Jupyter.keyboard_manager.actions.register({ + 'help' : 'nbTranslate: Configuration (toggle toolbar)', + 'icon' : 'fa-wrench', + 'handler': translateToolbarToggle //translateToolbar + }, 'show-nbTranslate-toolbar', 'nbTranslate'), + ])).find('.btn').eq(0).attr('id', 'showToolbar'); + } + } + + function translateHotkey(conf) { + add_edit_shortcuts[conf['hotkey']] = { + help: "Translate current cell", + help_index: 'yf', + handler: translateCurrentCell + }; + Jupyter.keyboard_manager.edit_shortcuts.add_shortcuts(add_edit_shortcuts); + Jupyter.keyboard_manager.command_shortcuts.add_shortcuts(add_edit_shortcuts); + } + + function main_function(conf) { + //alert(log_prefix+" main_function output") + show_mdcells(conf.displayLangs); + // add the targetLang to the list of langs, if not already present + if (listOfLangsInNotebook.indexOf(conf.targetLang) == -1) { + listOfLangsInNotebook.push(targetLang); + } + // add the sourceLang to the list of langs, if not already present + if (listOfLangsInNotebook.indexOf(conf.sourceLang) == -1) { + listOfLangsInNotebook.push(sourceLang); + } + // Display only the langs present in notebook + if (conf.displayLangs.indexOf('*') == -1) { + conf.displayLangs = $.makeArray($(listOfLangsInNotebook).filter(conf.displayLangs)); + } + else { + conf.displayLangs = ['*']; + } + // console.log(log_prefix, "Displaying langs ", conf.displayLangs); + + } + + function load_notebook_extension() { + + // Wait for the notebook to be fully loaded + if (Jupyter.notebook._fully_loaded) { + // this tests if the notebook is fully loaded + console.log(log_prefix + "Notebook fully loaded -- nbTranslate initialized ") + conf = initialize(conf); + } else { + console.log(log_prefix + "Waiting for notebook availability") + $([Jupyter.events]).on("notebook_loaded.Notebook", function() { + console.log(log_prefix + "nbTranslate initialized (via notebook_loaded)") + conf = initialize(conf); + }) + } + + } + + + return { + load_ipython_extension: load_notebook_extension + }; +}); diff --git a/.triton/dump/199215289adb100508718a5a762ba4d7/triton_.ptx b/.triton/dump/199215289adb100508718a5a762ba4d7/triton_.ptx new file mode 100644 index 0000000000000000000000000000000000000000..12368a3de34292de00a4c7dc42d7890ab0e33358 --- /dev/null +++ b/.triton/dump/199215289adb100508718a5a762ba4d7/triton_.ptx @@ -0,0 +1,453 @@ +// +// Generated by LLVM NVPTX Back-End +// + +.version 8.2 +.target sm_89 +.address_size 64 + + // .globl triton__0d1d2de +.extern .func __assertfail +( + .param .b64 __assertfail_param_0, + .param .b64 __assertfail_param_1, + .param .b32 __assertfail_param_2, + .param .b64 __assertfail_param_3, + .param .b64 __assertfail_param_4 +) +; +.global .align 1 .b8 assertFunc_0[25] = {95, 99, 97, 108, 108, 95, 119, 105, 116, 104, 95, 102, 114, 97, 109, 101, 115, 95, 114, 101, 109, 111, 118, 101, 100}; +.global .align 1 .b8 assertFile_0[38] = {60, 102, 114, 111, 122, 101, 110, 32, 105, 109, 112, 111, 114, 116, 108, 105, 98, 46, 95, 98, 111, 111, 116, 115, 116, 114, 97, 112, 95, 101, 120, 116, 101, 114, 110, 97, 108, 62}; +.global .align 1 .b8 assertMessage_0[38] = {105, 110, 100, 101, 120, 32, 111, 117, 116, 32, 111, 102, 32, 98, 111, 117, 110, 100, 115, 58, 32, 48, 32, 60, 61, 32, 116, 109, 112, 55, 32, 60, 32, 53, 48, 50, 53, 55}; +.extern .shared .align 1 .b8 global_smem[]; + +.visible .entry triton__0d1d2de( + .param .u64 triton__0d1d2de_param_0, + .param .u64 triton__0d1d2de_param_1, + .param .u64 triton__0d1d2de_param_2 +) +.maxntid 128, 1, 1 +{ + .reg .pred %p<24>; + .reg .b16 %rs<21>; + .reg .b32 %r<21>; + .reg .b64 %rd<58>; + .loc 1 18 0 +$L__func_begin0: + .loc 1 18 0 + + ld.param.u64 %rd9, [triton__0d1d2de_param_1]; + ld.param.u64 %rd16, [triton__0d1d2de_param_0]; +$L__tmp0: + .loc 1 21 36 + mov.u32 %r4, %tid.x; + and.b32 %r1, %r4, 127; + shl.b32 %r2, %r1, 1; + or.b32 %r5, %r2, 1; + or.b32 %r6, %r2, 256; + .loc 1 20 28 + mov.u32 %r3, %ctaid.x; + .loc 1 20 46 + mul.wide.s32 %rd1, %r3, 512; + cvt.u64.u32 %rd17, %r2; + cvt.u64.u32 %rd18, %r6; + .loc 1 21 23 + or.b64 %rd2, %rd1, %rd17; + or.b64 %rd3, %rd1, %rd18; + .loc 1 24 30 + shl.b64 %rd19, %rd2, 3; + add.s64 %rd12, %rd16, %rd19; + add.s64 %rd15, %rd12, 2048; + mov.pred %p20, -1; + .loc 1 24 35 + mov.u64 %rd10, 0x0; + mov.u64 %rd11, 0x0; + @%p20 ld.global.v2.b64 { %rd10, %rd11 }, [ %rd12 + 0 ]; + mov.u64 %rd13, 0x0; + mov.u64 %rd14, 0x0; + @%p20 ld.global.v2.b64 { %rd13, %rd14 }, [ %rd15 + 0 ]; + .loc 1 26 19 + setp.eq.s64 %p3, %rd14, -1; + setp.eq.s64 %p4, %rd13, -1; + setp.eq.s64 %p5, %rd11, -1; + setp.eq.s64 %p6, %rd10, -1; + .loc 1 28 32 + selp.b64 %rd20, 0, %rd10, %p6; + selp.b64 %rd21, 0, %rd11, %p5; + selp.b64 %rd22, 0, %rd13, %p4; + selp.b64 %rd23, 0, %rd14, %p3; + .loc 1 29 18 + add.s64 %rd24, %rd23, 50257; + add.s64 %rd25, %rd22, 50257; + add.s64 %rd26, %rd21, 50257; + add.s64 %rd27, %rd20, 50257; + .loc 1 30 18 + setp.lt.s64 %p7, %rd23, 0; + setp.lt.s64 %p8, %rd22, 0; + setp.lt.s64 %p9, %rd21, 0; + setp.lt.s64 %p10, %rd20, 0; + .loc 1 31 32 + selp.b64 %rd7, %rd27, %rd20, %p10; + selp.b64 %rd6, %rd26, %rd21, %p9; + selp.b64 %rd5, %rd25, %rd22, %p8; + selp.b64 %rd4, %rd24, %rd23, %p7; + .loc 1 32 36 + setp.lt.u64 %p11, %rd4, 50257; + setp.lt.u64 %p12, %rd5, 50257; + setp.lt.u64 %p13, %rd6, 50257; + setp.lt.u64 %p14, %rd7, 50257; + mov.u32 %r7, global_smem; + add.s32 %r8, %r7, %r2; + selp.u16 %rs1, 1, 0, %p14; + st.shared.u8 [%r8], %rs1; + cvt.u64.u32 %rd8, %r5; + selp.u16 %rs2, 1, 0, %p13; + st.shared.u8 [%r8+1], %rs2; + bar.sync 0; + add.s32 %r9, %r7, %r1; + ld.shared.u8 %rs3, [%r9]; + ld.shared.u8 %rs4, [%r9+128]; + bar.sync 0; + selp.u16 %rs5, 1, 0, %p12; + st.shared.u8 [%r8], %rs5; + selp.u16 %rs6, 1, 0, %p11; + st.shared.u8 [%r8+1], %rs6; + bar.sync 0; + ld.shared.u8 %rs7, [%r9]; + ld.shared.u8 %rs8, [%r9+128]; + setp.eq.s16 %p15, %rs7, 0; + selp.u16 %rs9, 1, 0, %p15; + shl.b16 %rs10, %rs9, 2; + setp.eq.s16 %p16, %rs8, 0; + selp.u16 %rs11, -1, 0, %p16; + shl.b16 %rs12, %rs11, 3; + or.b16 %rs13, %rs12, %rs10; + setp.eq.s16 %p17, %rs4, 0; + selp.u16 %rs14, 1, 0, %p17; + setp.eq.s16 %p18, %rs3, 0; + selp.u16 %rs15, -1, 0, %p18; + shl.b16 %rs16, %rs15, 1; + or.b16 %rs17, %rs14, %rs16; + and.b16 %rs18, %rs17, 3; + or.b16 %rs19, %rs18, %rs13; + .loc 1 32 51 + and.b16 %rs20, %rs19, 15; + setp.eq.s16 %p19, %rs20, 0; + @%p19 bra $L__BB0_2; + mov.u64 %rd28, assertMessage_0; + cvta.global.u64 %rd29, %rd28; + mov.u64 %rd30, assertFile_0; + cvta.global.u64 %rd31, %rd30; + mov.u64 %rd32, assertFunc_0; + cvta.global.u64 %rd33, %rd32; + mov.b32 %r10, 883; + mov.u64 %rd34, 1; + { // callseq 0, 0 + .reg .b32 temp_param_reg; + .param .b64 param0; + st.param.b64 [param0+0], %rd29; + .param .b64 param1; + st.param.b64 [param1+0], %rd31; + .param .b32 param2; + st.param.b32 [param2+0], %r10; + .param .b64 param3; + st.param.b64 [param3+0], %rd33; + .param .b64 param4; + st.param.b64 [param4+0], %rd34; + call.uni + __assertfail, + ( + param0, + param1, + param2, + param3, + param4 + ); + } // callseq 0 +$L__BB0_2: + .loc 1 21 36 + or.b32 %r15, %r2, 257; + cvt.u64.u32 %rd39, %r15; + .loc 1 21 23 + or.b64 %rd40, %rd1, %rd39; + or.b64 %rd41, %rd1, %rd8; + .loc 1 34 25 + shl.b64 %rd42, %rd7, 2; + add.s64 %rd43, %rd9, %rd42; + mul.lo.s64 %rd44, %rd2, 201028; + add.s64 %rd45, %rd43, %rd44; + shl.b64 %rd46, %rd6, 2; + add.s64 %rd47, %rd9, %rd46; + mul.lo.s64 %rd48, %rd41, 201028; + add.s64 %rd49, %rd47, %rd48; + shl.b64 %rd50, %rd5, 2; + add.s64 %rd51, %rd9, %rd50; + mul.lo.s64 %rd52, %rd3, 201028; + add.s64 %rd53, %rd51, %rd52; + shl.b64 %rd54, %rd4, 2; + add.s64 %rd55, %rd9, %rd54; + mul.lo.s64 %rd56, %rd40, 201028; + add.s64 %rd57, %rd55, %rd56; + .loc 1 34 51 + bar.sync 0; + shl.b32 %r16, %r2, 3; + add.s32 %r18, %r7, %r16; + st.shared.u64 [%r18], %rd45; + st.shared.u64 [%r18+8], %rd49; + bar.sync 0; + shl.b32 %r19, %r1, 3; + add.s32 %r20, %r7, %r19; + ld.shared.u64 %rd35, [%r20]; + ld.shared.u64 %rd36, [%r20+1024]; + bar.sync 0; + st.shared.u64 [%r18], %rd53; + st.shared.u64 [%r18+8], %rd57; + bar.sync 0; + ld.shared.u64 %rd37, [%r20]; + ld.shared.u64 %rd38, [%r20+1024]; + mov.b32 %r11, -1082130432; + @%p20 st.global.b32 [ %rd35 + 0 ], { %r11 }; + @%p20 st.global.b32 [ %rd36 + 0 ], { %r11 }; + @%p20 st.global.b32 [ %rd37 + 0 ], { %r11 }; + @%p20 st.global.b32 [ %rd38 + 0 ], { %r11 }; + .loc 1 34 4 + ret; +$L__tmp1: +$L__func_end0: + +} + .file 1 "/tmp/torchinductor_root/hl/chlrkgpvvbdizdz7sllquet2j7zhtes6meh6kenrqxov26mswvw7.py" + .section .debug_abbrev + { +.b8 1 +.b8 17 +.b8 1 +.b8 37 +.b8 8 +.b8 19 +.b8 5 +.b8 3 +.b8 8 +.b8 16 +.b8 6 +.b8 27 +.b8 8 +.b8 180 +.b8 66 +.b8 12 +.b8 17 +.b8 1 +.b8 18 +.b8 1 +.b8 0 +.b8 0 +.b8 2 +.b8 46 +.b8 0 +.b8 17 +.b8 1 +.b8 18 +.b8 1 +.b8 64 +.b8 10 +.b8 135 +.b8 64 +.b8 8 +.b8 3 +.b8 8 +.b8 58 +.b8 11 +.b8 59 +.b8 11 +.b8 63 +.b8 12 +.b8 0 +.b8 0 +.b8 0 + } + .section .debug_info + { +.b32 176 +.b8 2 +.b8 0 +.b32 .debug_abbrev +.b8 8 +.b8 1 +.b8 116 +.b8 114 +.b8 105 +.b8 116 +.b8 111 +.b8 110 +.b8 0 +.b8 2 +.b8 0 +.b8 99 +.b8 104 +.b8 108 +.b8 114 +.b8 107 +.b8 103 +.b8 112 +.b8 118 +.b8 118 +.b8 98 +.b8 100 +.b8 105 +.b8 122 +.b8 100 +.b8 122 +.b8 55 +.b8 115 +.b8 108 +.b8 108 +.b8 113 +.b8 117 +.b8 101 +.b8 116 +.b8 50 +.b8 106 +.b8 55 +.b8 122 +.b8 104 +.b8 116 +.b8 101 +.b8 115 +.b8 54 +.b8 109 +.b8 101 +.b8 104 +.b8 54 +.b8 107 +.b8 101 +.b8 110 +.b8 114 +.b8 113 +.b8 120 +.b8 111 +.b8 118 +.b8 50 +.b8 54 +.b8 109 +.b8 115 +.b8 119 +.b8 118 +.b8 119 +.b8 55 +.b8 46 +.b8 112 +.b8 121 +.b8 0 +.b32 .debug_line +.b8 47 +.b8 116 +.b8 109 +.b8 112 +.b8 47 +.b8 116 +.b8 111 +.b8 114 +.b8 99 +.b8 104 +.b8 105 +.b8 110 +.b8 100 +.b8 117 +.b8 99 +.b8 116 +.b8 111 +.b8 114 +.b8 95 +.b8 114 +.b8 111 +.b8 111 +.b8 116 +.b8 47 +.b8 104 +.b8 108 +.b8 0 +.b8 1 +.b64 $L__func_begin0 +.b64 $L__func_end0 +.b8 2 +.b64 $L__func_begin0 +.b64 $L__func_end0 +.b8 1 +.b8 156 +.b8 116 +.b8 114 +.b8 105 +.b8 116 +.b8 111 +.b8 110 +.b8 95 +.b8 95 +.b8 48 +.b8 100 +.b8 49 +.b8 100 +.b8 50 +.b8 100 +.b8 101 +.b8 0 +.b8 116 +.b8 114 +.b8 105 +.b8 116 +.b8 111 +.b8 110 +.b8 95 +.b8 95 +.b8 48 +.b8 100 +.b8 49 +.b8 100 +.b8 50 +.b8 100 +.b8 101 +.b8 0 +.b8 1 +.b8 18 +.b8 1 +.b8 0 + } + .section .debug_pubnames + { +.b32 $L__pubNames_end0-$L__pubNames_start0 +$L__pubNames_start0: +.b8 2 +.b8 0 +.b32 .debug_info +.b32 180 +.b32 125 +.b8 116 +.b8 114 +.b8 105 +.b8 116 +.b8 111 +.b8 110 +.b8 95 +.b8 95 +.b8 48 +.b8 100 +.b8 49 +.b8 100 +.b8 50 +.b8 100 +.b8 101 +.b8 0 +.b32 0 +$L__pubNames_end0: + } + .section .debug_pubtypes + { +.b32 $L__pubTypes_end0-$L__pubTypes_start0 +$L__pubTypes_start0: +.b8 2 +.b8 0 +.b32 .debug_info +.b32 180 +.b32 0 +$L__pubTypes_end0: + } + .section .debug_loc { } diff --git a/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.cubin b/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.cubin new file mode 100644 index 0000000000000000000000000000000000000000..7cdb8f0e8a64a9c3c83321f8223fa49aa88be30c Binary files /dev/null and b/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.cubin differ diff --git a/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.llir b/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.llir new file mode 100644 index 0000000000000000000000000000000000000000..92808eebe0f2c8863c7ff20b1eeb86b4fa18c046 --- /dev/null +++ b/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.llir @@ -0,0 +1,424 @@ +; ModuleID = 'LLVMDialectModule' +source_filename = "LLVMDialectModule" + +@global_smem = external addrspace(3) global [0 x i8] + +define void @triton__0d1d2d3d4d5d6d7de8(ptr addrspace(1) %0, ptr addrspace(1) %1, ptr addrspace(1) %2, ptr addrspace(1) %3, ptr addrspace(1) %4, ptr addrspace(1) %5, ptr addrspace(1) %6, i64 %7, i64 %8) local_unnamed_addr !dbg !5 { + %10 = tail call i32 @llvm.nvvm.read.ptx.sreg.tid.x(), !dbg !8 + %11 = lshr i32 %10, 5, !dbg !8 + %urem = and i32 %10, 255, !dbg !8 + %12 = or i32 %urem, 256, !dbg !8 + %13 = or i32 %urem, 512, !dbg !8 + %14 = or i32 %urem, 768, !dbg !8 + %15 = or i32 %urem, 1024, !dbg !8 + %16 = or i32 %urem, 1280, !dbg !8 + %17 = or i32 %urem, 1536, !dbg !8 + %18 = or i32 %urem, 1792, !dbg !8 + %19 = tail call i32 asm "mov.u32 $0, %ctaid.x;", "=r"() #3, !dbg !9 + %20 = sext i32 %19 to i64, !dbg !10 + %21 = insertelement <8 x i32> poison, i32 %urem, i64 0 + %22 = insertelement <8 x i32> %21, i32 %12, i64 1 + %23 = insertelement <8 x i32> %22, i32 %13, i64 2 + %24 = insertelement <8 x i32> %23, i32 %14, i64 3 + %25 = insertelement <8 x i32> %24, i32 %15, i64 4 + %26 = insertelement <8 x i32> %25, i32 %16, i64 5 + %27 = insertelement <8 x i32> %26, i32 %17, i64 6 + %28 = insertelement <8 x i32> %27, i32 %18, i64 7 + %29 = zext <8 x i32> %28 to <8 x i64> + %30 = getelementptr i64, ptr addrspace(1) %1, i64 %20, !dbg !11 + %31 = tail call i64 asm sideeffect "mov.u64 $0, 0x0;\0A\09@$2 ld.global.L1::evict_last.b64 { $0 }, [ $1 + 0 ];", "=l,l,b"(ptr addrspace(1) %30, i1 true) #3, !dbg !12 + %32 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.b32 { $0 }, [ $1 + 0 ];", "=r,l,b"(ptr addrspace(1) %2, i1 true) #3, !dbg !13 + %33 = bitcast i32 %32 to float, !dbg !13 + %34 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.b32 { $0 }, [ $1 + 0 ];", "=r,l,b"(ptr addrspace(1) %3, i1 true) #3, !dbg !14 + %35 = bitcast i32 %34 to float, !dbg !14 + %36 = mul nsw i64 %20, 50257, !dbg !15 + %.not = icmp eq i64 %31, -1, !dbg !16 + %37 = tail call float asm "div.full.f32 $0, $1, $2;", "=r,r,r"(float %33, float %35) #3, !dbg !17 + %38 = select i1 %.not, float 0.000000e+00, float %37, !dbg !18 + %invariant.gep = getelementptr float, ptr addrspace(1) %0, i64 %36, !dbg !19 + %39 = insertelement <8 x float> poison, float %38, i64 0, !dbg !20 + %40 = shufflevector <8 x float> %39, <8 x float> poison, <8 x i32> zeroinitializer, !dbg !20 + br label %41, !dbg !19 + +41: ; preds = %9, %41 + %42 = phi i32 [ 0, %9 ], [ %85, %41 ] + %43 = phi <8 x float> [ zeroinitializer, %9 ], [ %84, %41 ] + %44 = zext nneg i32 %42 to i64, !dbg !21 + %45 = insertelement <8 x i64> poison, i64 %44, i64 0, !dbg !21 + %46 = shufflevector <8 x i64> %45, <8 x i64> poison, <8 x i32> zeroinitializer, !dbg !21 + %47 = or <8 x i64> %46, %29, !dbg !21 + %48 = icmp ult <8 x i64> %47, , !dbg !22 + %49 = extractelement <8 x i64> %47, i64 0, !dbg !23 + %gep = getelementptr float, ptr addrspace(1) %invariant.gep, i64 %49, !dbg !23 + %50 = extractelement <8 x i64> %47, i64 1, !dbg !23 + %gep3 = getelementptr float, ptr addrspace(1) %invariant.gep, i64 %50, !dbg !23 + %51 = extractelement <8 x i64> %47, i64 2, !dbg !23 + %gep5 = getelementptr float, ptr addrspace(1) %invariant.gep, i64 %51, !dbg !23 + %52 = extractelement <8 x i64> %47, i64 3, !dbg !23 + %gep7 = getelementptr float, ptr addrspace(1) %invariant.gep, i64 %52, !dbg !23 + %53 = extractelement <8 x i64> %47, i64 4, !dbg !23 + %gep9 = getelementptr float, ptr addrspace(1) %invariant.gep, i64 %53, !dbg !23 + %54 = extractelement <8 x i64> %47, i64 5, !dbg !23 + %gep11 = getelementptr float, ptr addrspace(1) %invariant.gep, i64 %54, !dbg !23 + %55 = extractelement <8 x i64> %47, i64 6, !dbg !23 + %gep13 = getelementptr float, ptr addrspace(1) %invariant.gep, i64 %55, !dbg !23 + %56 = extractelement <8 x i64> %47, i64 7, !dbg !23 + %gep15 = getelementptr float, ptr addrspace(1) %invariant.gep, i64 %56, !dbg !23 + %57 = extractelement <8 x i1> %48, i64 0, !dbg !24 + %58 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_last.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %gep, i1 %57, i32 0, i1 %57) #3, !dbg !24 + %59 = extractelement <8 x i1> %48, i64 1, !dbg !24 + %60 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_last.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %gep3, i1 %59, i32 0, i1 %59) #3, !dbg !24 + %61 = extractelement <8 x i1> %48, i64 2, !dbg !24 + %62 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_last.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %gep5, i1 %61, i32 0, i1 %61) #3, !dbg !24 + %63 = extractelement <8 x i1> %48, i64 3, !dbg !24 + %64 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_last.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %gep7, i1 %63, i32 0, i1 %63) #3, !dbg !24 + %65 = extractelement <8 x i1> %48, i64 4, !dbg !24 + %66 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_last.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %gep9, i1 %65, i32 0, i1 %65) #3, !dbg !24 + %67 = extractelement <8 x i1> %48, i64 5, !dbg !24 + %68 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_last.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %gep11, i1 %67, i32 0, i1 %67) #3, !dbg !24 + %69 = extractelement <8 x i1> %48, i64 6, !dbg !24 + %70 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_last.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %gep13, i1 %69, i32 0, i1 %69) #3, !dbg !24 + %71 = extractelement <8 x i1> %48, i64 7, !dbg !24 + %72 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_last.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %gep15, i1 %71, i32 0, i1 %71) #3, !dbg !24 + %73 = insertelement <8 x i32> poison, i32 %58, i64 0, !dbg !24 + %74 = insertelement <8 x i32> %73, i32 %60, i64 1, !dbg !24 + %75 = insertelement <8 x i32> %74, i32 %62, i64 2, !dbg !24 + %76 = insertelement <8 x i32> %75, i32 %64, i64 3, !dbg !24 + %77 = insertelement <8 x i32> %76, i32 %66, i64 4, !dbg !24 + %78 = insertelement <8 x i32> %77, i32 %68, i64 5, !dbg !24 + %79 = insertelement <8 x i32> %78, i32 %70, i64 6, !dbg !24 + %80 = insertelement <8 x i32> %79, i32 %72, i64 7, !dbg !24 + %81 = bitcast <8 x i32> %80 to <8 x float>, !dbg !24 + %82 = fmul <8 x float> %40, %81, !dbg !20 + %83 = select <8 x i1> %48, <8 x float> %82, <8 x float> , !dbg !25 + %84 = fadd <8 x float> %43, %83, !dbg !25 + %85 = add nuw nsw i32 %42, 2048, !dbg !19 + %86 = icmp ult i32 %42, 48209, !dbg !19 + br i1 %86, label %41, label %87, !dbg !19 + +87: ; preds = %41 + %88 = and i32 %10, 31, !dbg !8 + %89 = and i32 %11, 7, !dbg !8 + %shift = shufflevector <8 x float> %84, <8 x float> poison, <8 x i32> , !dbg !26 + %90 = fadd <8 x float> %84, %shift, !dbg !26 + %shift37 = shufflevector <8 x float> %84, <8 x float> poison, <8 x i32> , !dbg !26 + %91 = fadd <8 x float> %shift37, %90, !dbg !26 + %shift38 = shufflevector <8 x float> %84, <8 x float> poison, <8 x i32> , !dbg !26 + %92 = fadd <8 x float> %shift38, %91, !dbg !26 + %shift39 = shufflevector <8 x float> %84, <8 x float> poison, <8 x i32> , !dbg !26 + %93 = fadd <8 x float> %shift39, %92, !dbg !26 + %shift40 = shufflevector <8 x float> %84, <8 x float> poison, <8 x i32> , !dbg !26 + %94 = fadd <8 x float> %shift40, %93, !dbg !26 + %shift41 = shufflevector <8 x float> %84, <8 x float> poison, <8 x i32> , !dbg !26 + %95 = fadd <8 x float> %shift41, %94, !dbg !26 + %shift42 = shufflevector <8 x float> %84, <8 x float> poison, <8 x i32> , !dbg !26 + %96 = fadd <8 x float> %shift42, %95, !dbg !26 + %97 = extractelement <8 x float> %96, i64 0, !dbg !26 + %98 = bitcast float %97 to i32, !dbg !32 + %99 = tail call i32 @llvm.nvvm.shfl.sync.bfly.i32(i32 -1, i32 %98, i32 16, i32 31), !dbg !32 + %100 = bitcast i32 %99 to float, !dbg !32 + %101 = fadd float %97, %100, !dbg !26 + %102 = bitcast float %101 to i32, !dbg !32 + %103 = tail call i32 @llvm.nvvm.shfl.sync.bfly.i32(i32 -1, i32 %102, i32 8, i32 31), !dbg !32 + %104 = bitcast i32 %103 to float, !dbg !32 + %105 = fadd float %101, %104, !dbg !26 + %106 = bitcast float %105 to i32, !dbg !32 + %107 = tail call i32 @llvm.nvvm.shfl.sync.bfly.i32(i32 -1, i32 %106, i32 4, i32 31), !dbg !32 + %108 = bitcast i32 %107 to float, !dbg !32 + %109 = fadd float %105, %108, !dbg !26 + %110 = bitcast float %109 to i32, !dbg !32 + %111 = tail call i32 @llvm.nvvm.shfl.sync.bfly.i32(i32 -1, i32 %110, i32 2, i32 31), !dbg !32 + %112 = bitcast i32 %111 to float, !dbg !32 + %113 = fadd float %109, %112, !dbg !26 + %114 = bitcast float %113 to i32, !dbg !32 + %115 = tail call i32 @llvm.nvvm.shfl.sync.bfly.i32(i32 -1, i32 %114, i32 1, i32 31), !dbg !32 + %116 = bitcast i32 %115 to float, !dbg !32 + %117 = fadd float %113, %116, !dbg !26 + %118 = icmp eq i32 %88, 0, !dbg !32 + %119 = zext nneg i32 %89 to i64, !dbg !32 + %120 = getelementptr float, ptr addrspace(3) @global_smem, i64 %119, !dbg !32 + tail call void asm sideeffect "@$2 st.shared.b32 [ $0 + 0 ], $1;", "r,r,b"(ptr addrspace(3) %120, float %117, i1 %118) #3, !dbg !32 + tail call void @llvm.nvvm.barrier0(), !dbg !32 + %121 = icmp slt i32 %10, 8, !dbg !32 + %122 = sext i32 %10 to i64, !dbg !32 + %123 = getelementptr float, ptr addrspace(3) @global_smem, i64 %122, !dbg !32 + %124 = tail call float asm sideeffect "@$2 ld.shared.b32 $0, [ $1 + 0 ];", "=r,r,b"(ptr addrspace(3) %123, i1 %121) #3, !dbg !32 + %125 = bitcast float %124 to i32, !dbg !32 + %126 = tail call i32 @llvm.nvvm.shfl.sync.bfly.i32(i32 -1, i32 %125, i32 4, i32 31), !dbg !32 + %127 = bitcast i32 %126 to float, !dbg !32 + %128 = fadd float %124, %127, !dbg !26 + %129 = bitcast float %128 to i32, !dbg !32 + %130 = tail call i32 @llvm.nvvm.shfl.sync.bfly.i32(i32 -1, i32 %129, i32 2, i32 31), !dbg !32 + %131 = bitcast i32 %130 to float, !dbg !32 + %132 = fadd float %128, %131, !dbg !26 + %133 = bitcast float %132 to i32, !dbg !32 + %134 = tail call i32 @llvm.nvvm.shfl.sync.bfly.i32(i32 -1, i32 %133, i32 1, i32 31), !dbg !32 + %135 = bitcast i32 %134 to float, !dbg !32 + %136 = fadd float %132, %135, !dbg !26 + %137 = and i32 %10, 7, !dbg !32 + %138 = icmp eq i32 %137, 0, !dbg !32 + %139 = and i1 %121, %138, !dbg !32 + tail call void asm sideeffect "@$2 st.shared.b32 [ $0 + 0 ], $1;", "r,r,b"(ptr addrspace(3) %123, float %136, i1 %139) #3, !dbg !32 + tail call void @llvm.nvvm.barrier0(), !dbg !32 + %140 = load float, ptr addrspace(3) @global_smem, align 4, !dbg !32 + %141 = extractelement <8 x i64> %29, i64 0, !dbg !34 + %142 = extractelement <8 x i64> %29, i64 1, !dbg !34 + %143 = extractelement <8 x i64> %29, i64 2, !dbg !34 + %144 = extractelement <8 x i64> %29, i64 3, !dbg !34 + %145 = extractelement <8 x i64> %29, i64 4, !dbg !34 + %146 = extractelement <8 x i64> %29, i64 5, !dbg !34 + %147 = extractelement <8 x i64> %29, i64 6, !dbg !34 + %148 = extractelement <8 x i64> %29, i64 7, !dbg !34 + br label %149, !dbg !35 + +149: ; preds = %87, %149 + %150 = phi i32 [ 0, %87 ], [ %312, %149 ] + %151 = zext nneg i32 %150 to i64, !dbg !34 + %152 = or i64 %141, %151, !dbg !34 + %153 = or i64 %142, %151, !dbg !34 + %154 = or i64 %143, %151, !dbg !34 + %155 = or i64 %144, %151, !dbg !34 + %156 = or i64 %145, %151, !dbg !34 + %157 = or i64 %146, %151, !dbg !34 + %158 = or i64 %147, %151, !dbg !34 + %159 = or i64 %148, %151, !dbg !34 + %160 = icmp ult i64 %152, 50257, !dbg !36 + %161 = icmp ult i64 %153, 50257, !dbg !36 + %162 = icmp ult i64 %154, 50257, !dbg !36 + %163 = icmp ult i64 %155, 50257, !dbg !36 + %164 = icmp ult i64 %156, 50257, !dbg !36 + %165 = icmp ult i64 %157, 50257, !dbg !36 + %166 = icmp ult i64 %158, 50257, !dbg !36 + %167 = icmp ult i64 %159, 50257, !dbg !36 + %168 = add nsw i64 %152, %36, !dbg !37 + %169 = add nsw i64 %153, %36, !dbg !37 + %170 = add nsw i64 %154, %36, !dbg !37 + %171 = add nsw i64 %155, %36, !dbg !37 + %172 = add nsw i64 %156, %36, !dbg !37 + %173 = add nsw i64 %157, %36, !dbg !37 + %174 = add nsw i64 %158, %36, !dbg !37 + %175 = add nsw i64 %159, %36, !dbg !37 + %176 = getelementptr i16, ptr addrspace(1) %4, i64 %168, !dbg !38 + %177 = getelementptr i16, ptr addrspace(1) %4, i64 %169, !dbg !38 + %178 = getelementptr i16, ptr addrspace(1) %4, i64 %170, !dbg !38 + %179 = getelementptr i16, ptr addrspace(1) %4, i64 %171, !dbg !38 + %180 = getelementptr i16, ptr addrspace(1) %4, i64 %172, !dbg !38 + %181 = getelementptr i16, ptr addrspace(1) %4, i64 %173, !dbg !38 + %182 = getelementptr i16, ptr addrspace(1) %4, i64 %174, !dbg !38 + %183 = getelementptr i16, ptr addrspace(1) %4, i64 %175, !dbg !38 + %184 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %176, i1 %160, i16 0, i1 %160) #3, !dbg !39 + %185 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %177, i1 %161, i16 0, i1 %161) #3, !dbg !39 + %186 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %178, i1 %162, i16 0, i1 %162) #3, !dbg !39 + %187 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %179, i1 %163, i16 0, i1 %163) #3, !dbg !39 + %188 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %180, i1 %164, i16 0, i1 %164) #3, !dbg !39 + %189 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %181, i1 %165, i16 0, i1 %165) #3, !dbg !39 + %190 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %182, i1 %166, i16 0, i1 %166) #3, !dbg !39 + %191 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %183, i1 %167, i16 0, i1 %167) #3, !dbg !39 + %192 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %184) #3, !dbg !40 + %193 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %185) #3, !dbg !40 + %194 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %186) #3, !dbg !40 + %195 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %187) #3, !dbg !40 + %196 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %188) #3, !dbg !40 + %197 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %189) #3, !dbg !40 + %198 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %190) #3, !dbg !40 + %199 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %191) #3, !dbg !40 + %200 = getelementptr float, ptr addrspace(1) %0, i64 %168, !dbg !41 + %201 = getelementptr float, ptr addrspace(1) %0, i64 %169, !dbg !41 + %202 = getelementptr float, ptr addrspace(1) %0, i64 %170, !dbg !41 + %203 = getelementptr float, ptr addrspace(1) %0, i64 %171, !dbg !41 + %204 = getelementptr float, ptr addrspace(1) %0, i64 %172, !dbg !41 + %205 = getelementptr float, ptr addrspace(1) %0, i64 %173, !dbg !41 + %206 = getelementptr float, ptr addrspace(1) %0, i64 %174, !dbg !41 + %207 = getelementptr float, ptr addrspace(1) %0, i64 %175, !dbg !41 + %208 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %200, i1 %160, i32 0, i1 %160) #3, !dbg !42 + %209 = bitcast i32 %208 to float, !dbg !42 + %210 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %201, i1 %161, i32 0, i1 %161) #3, !dbg !42 + %211 = bitcast i32 %210 to float, !dbg !42 + %212 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %202, i1 %162, i32 0, i1 %162) #3, !dbg !42 + %213 = bitcast i32 %212 to float, !dbg !42 + %214 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %203, i1 %163, i32 0, i1 %163) #3, !dbg !42 + %215 = bitcast i32 %214 to float, !dbg !42 + %216 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %204, i1 %164, i32 0, i1 %164) #3, !dbg !42 + %217 = bitcast i32 %216 to float, !dbg !42 + %218 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %205, i1 %165, i32 0, i1 %165) #3, !dbg !42 + %219 = bitcast i32 %218 to float, !dbg !42 + %220 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %206, i1 %166, i32 0, i1 %166) #3, !dbg !42 + %221 = bitcast i32 %220 to float, !dbg !42 + %222 = tail call i32 asm sideeffect "mov.u32 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b32 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u32 $0, $3;", "=r,l,b,r,b"(ptr addrspace(1) %207, i1 %167, i32 0, i1 %167) #3, !dbg !42 + %223 = bitcast i32 %222 to float, !dbg !42 + %224 = getelementptr i16, ptr addrspace(1) %5, i64 %168, !dbg !43 + %225 = getelementptr i16, ptr addrspace(1) %5, i64 %169, !dbg !43 + %226 = getelementptr i16, ptr addrspace(1) %5, i64 %170, !dbg !43 + %227 = getelementptr i16, ptr addrspace(1) %5, i64 %171, !dbg !43 + %228 = getelementptr i16, ptr addrspace(1) %5, i64 %172, !dbg !43 + %229 = getelementptr i16, ptr addrspace(1) %5, i64 %173, !dbg !43 + %230 = getelementptr i16, ptr addrspace(1) %5, i64 %174, !dbg !43 + %231 = getelementptr i16, ptr addrspace(1) %5, i64 %175, !dbg !43 + %232 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %224, i1 %160, i16 0, i1 %160) #3, !dbg !44 + %233 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %225, i1 %161, i16 0, i1 %161) #3, !dbg !44 + %234 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %226, i1 %162, i16 0, i1 %162) #3, !dbg !44 + %235 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %227, i1 %163, i16 0, i1 %163) #3, !dbg !44 + %236 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %228, i1 %164, i16 0, i1 %164) #3, !dbg !44 + %237 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %229, i1 %165, i16 0, i1 %165) #3, !dbg !44 + %238 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %230, i1 %166, i16 0, i1 %166) #3, !dbg !44 + %239 = tail call i16 asm sideeffect "mov.u16 $0, 0x0;\0A\09@$2 ld.global.L1::evict_first.b16 { $0 }, [ $1 + 0 ];\0A\09@!$4 mov.u16 $0, $3;", "=c,l,b,c,b"(ptr addrspace(1) %231, i1 %167, i16 0, i1 %167) #3, !dbg !44 + %240 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %232) #3, !dbg !45 + %241 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %233) #3, !dbg !45 + %242 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %234) #3, !dbg !45 + %243 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %235) #3, !dbg !45 + %244 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %236) #3, !dbg !45 + %245 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %237) #3, !dbg !45 + %246 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %238) #3, !dbg !45 + %247 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %239) #3, !dbg !45 + %248 = fmul float %38, %209, !dbg !46 + %249 = fmul float %38, %211, !dbg !46 + %250 = fmul float %38, %213, !dbg !46 + %251 = fmul float %38, %215, !dbg !46 + %252 = fmul float %38, %217, !dbg !46 + %253 = fmul float %38, %219, !dbg !46 + %254 = fmul float %38, %221, !dbg !46 + %255 = fmul float %38, %223, !dbg !46 + %256 = fmul float %240, 0x3FF7154760000000, !dbg !47 + %257 = tail call float asm "ex2.approx.f32 $0, $1;", "=f,f"(float %256) #3, !dbg !47 + %258 = fmul float %241, 0x3FF7154760000000, !dbg !47 + %259 = tail call float asm "ex2.approx.f32 $0, $1;", "=f,f"(float %258) #3, !dbg !47 + %260 = fmul float %242, 0x3FF7154760000000, !dbg !47 + %261 = tail call float asm "ex2.approx.f32 $0, $1;", "=f,f"(float %260) #3, !dbg !47 + %262 = fmul float %243, 0x3FF7154760000000, !dbg !47 + %263 = tail call float asm "ex2.approx.f32 $0, $1;", "=f,f"(float %262) #3, !dbg !47 + %264 = fmul float %244, 0x3FF7154760000000, !dbg !47 + %265 = tail call float asm "ex2.approx.f32 $0, $1;", "=f,f"(float %264) #3, !dbg !47 + %266 = fmul float %245, 0x3FF7154760000000, !dbg !47 + %267 = tail call float asm "ex2.approx.f32 $0, $1;", "=f,f"(float %266) #3, !dbg !47 + %268 = fmul float %246, 0x3FF7154760000000, !dbg !47 + %269 = tail call float asm "ex2.approx.f32 $0, $1;", "=f,f"(float %268) #3, !dbg !47 + %270 = fmul float %247, 0x3FF7154760000000, !dbg !47 + %271 = tail call float asm "ex2.approx.f32 $0, $1;", "=f,f"(float %270) #3, !dbg !47 + %272 = fmul float %140, %257, !dbg !48 + %273 = fmul float %140, %259, !dbg !48 + %274 = fmul float %140, %261, !dbg !48 + %275 = fmul float %140, %263, !dbg !48 + %276 = fmul float %140, %265, !dbg !48 + %277 = fmul float %140, %267, !dbg !48 + %278 = fmul float %140, %269, !dbg !48 + %279 = fmul float %140, %271, !dbg !48 + %280 = fsub float %248, %272, !dbg !49 + %281 = fsub float %249, %273, !dbg !49 + %282 = fsub float %250, %274, !dbg !49 + %283 = fsub float %251, %275, !dbg !49 + %284 = fsub float %252, %276, !dbg !49 + %285 = fsub float %253, %277, !dbg !49 + %286 = fsub float %254, %278, !dbg !49 + %287 = fsub float %255, %279, !dbg !49 + %288 = fadd float %192, %280, !dbg !50 + %289 = fadd float %193, %281, !dbg !50 + %290 = fadd float %194, %282, !dbg !50 + %291 = fadd float %195, %283, !dbg !50 + %292 = fadd float %196, %284, !dbg !50 + %293 = fadd float %197, %285, !dbg !50 + %294 = fadd float %198, %286, !dbg !50 + %295 = fadd float %199, %287, !dbg !50 + %296 = getelementptr i16, ptr addrspace(1) %6, i64 %168, !dbg !51 + %297 = getelementptr i16, ptr addrspace(1) %6, i64 %169, !dbg !51 + %298 = getelementptr i16, ptr addrspace(1) %6, i64 %170, !dbg !51 + %299 = getelementptr i16, ptr addrspace(1) %6, i64 %171, !dbg !51 + %300 = getelementptr i16, ptr addrspace(1) %6, i64 %172, !dbg !51 + %301 = getelementptr i16, ptr addrspace(1) %6, i64 %173, !dbg !51 + %302 = getelementptr i16, ptr addrspace(1) %6, i64 %174, !dbg !51 + %303 = getelementptr i16, ptr addrspace(1) %6, i64 %175, !dbg !51 + %304 = tail call i16 asm "cvt.rn.bf16.f32 $0, $1;", "=h,r"(float %288) #3, !dbg !52 + %305 = tail call i16 asm "cvt.rn.bf16.f32 $0, $1;", "=h,r"(float %289) #3, !dbg !52 + %306 = tail call i16 asm "cvt.rn.bf16.f32 $0, $1;", "=h,r"(float %290) #3, !dbg !52 + %307 = tail call i16 asm "cvt.rn.bf16.f32 $0, $1;", "=h,r"(float %291) #3, !dbg !52 + %308 = tail call i16 asm "cvt.rn.bf16.f32 $0, $1;", "=h,r"(float %292) #3, !dbg !52 + %309 = tail call i16 asm "cvt.rn.bf16.f32 $0, $1;", "=h,r"(float %293) #3, !dbg !52 + %310 = tail call i16 asm "cvt.rn.bf16.f32 $0, $1;", "=h,r"(float %294) #3, !dbg !52 + %311 = tail call i16 asm "cvt.rn.bf16.f32 $0, $1;", "=h,r"(float %295) #3, !dbg !52 + tail call void asm sideeffect "@$2 st.global.b16 [ $1 + 0 ], { $0 };", "c,l,b"(i16 %304, ptr addrspace(1) %296, i1 %160) #3, !dbg !52 + tail call void asm sideeffect "@$2 st.global.b16 [ $1 + 0 ], { $0 };", "c,l,b"(i16 %305, ptr addrspace(1) %297, i1 %161) #3, !dbg !52 + tail call void asm sideeffect "@$2 st.global.b16 [ $1 + 0 ], { $0 };", "c,l,b"(i16 %306, ptr addrspace(1) %298, i1 %162) #3, !dbg !52 + tail call void asm sideeffect "@$2 st.global.b16 [ $1 + 0 ], { $0 };", "c,l,b"(i16 %307, ptr addrspace(1) %299, i1 %163) #3, !dbg !52 + tail call void asm sideeffect "@$2 st.global.b16 [ $1 + 0 ], { $0 };", "c,l,b"(i16 %308, ptr addrspace(1) %300, i1 %164) #3, !dbg !52 + tail call void asm sideeffect "@$2 st.global.b16 [ $1 + 0 ], { $0 };", "c,l,b"(i16 %309, ptr addrspace(1) %301, i1 %165) #3, !dbg !52 + tail call void asm sideeffect "@$2 st.global.b16 [ $1 + 0 ], { $0 };", "c,l,b"(i16 %310, ptr addrspace(1) %302, i1 %166) #3, !dbg !52 + tail call void asm sideeffect "@$2 st.global.b16 [ $1 + 0 ], { $0 };", "c,l,b"(i16 %311, ptr addrspace(1) %303, i1 %167) #3, !dbg !52 + %312 = add nuw nsw i32 %150, 2048, !dbg !35 + %313 = icmp ult i32 %150, 48209, !dbg !35 + br i1 %313, label %149, label %314, !dbg !35 + +314: ; preds = %149 + ret void, !dbg !53 +} + +; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare noundef i32 @llvm.nvvm.read.ptx.sreg.tid.x() #0 + +; Function Attrs: convergent nocallback nounwind memory(inaccessiblemem: readwrite) +declare i32 @llvm.nvvm.shfl.sync.bfly.i32(i32, i32, i32, i32) #1 + +; Function Attrs: convergent nocallback nounwind +declare void @llvm.nvvm.barrier0() #2 + +attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #1 = { convergent nocallback nounwind memory(inaccessiblemem: readwrite) } +attributes #2 = { convergent nocallback nounwind } +attributes #3 = { nounwind } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!nvvm.annotations = !{!3, !4, !4, !3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_C, file: !2, producer: "triton", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "ckzgl7thb4xdfkfnd2tidks6mt5f3hauwfyjflbtzyepo5oxkvhk.py", directory: "/tmp/torchinductor_root/kz") +!3 = !{ptr @triton__0d1d2d3d4d5d6d7de8, !"kernel", i32 1} +!4 = !{ptr @triton__0d1d2d3d4d5d6d7de8, !"maxntidx", i32 256} +!5 = distinct !DISubprogram(name: "triton__0d1d2d3d4d5d6d7de8", linkageName: "triton__0d1d2d3d4d5d6d7de8", scope: !2, file: !2, line: 18, type: !6, scopeLine: 18, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !1) +!6 = !DISubroutineType(cc: DW_CC_normal, types: !7) +!7 = !{} +!8 = !DILocation(line: 24, column: 33, scope: !5) +!9 = !DILocation(line: 21, column: 28, scope: !5) +!10 = !DILocation(line: 21, column: 34, scope: !5) +!11 = !DILocation(line: 26, column: 30, scope: !5) +!12 = !DILocation(line: 26, column: 35, scope: !5) +!13 = !DILocation(line: 27, column: 19, scope: !5) +!14 = !DILocation(line: 29, column: 19, scope: !5) +!15 = !DILocation(line: 36, column: 46, scope: !5) +!16 = !DILocation(line: 38, column: 23, scope: !5) +!17 = !DILocation(line: 39, column: 22, scope: !5) +!18 = !DILocation(line: 41, column: 37, scope: !5) +!19 = !DILocation(line: 32, column: 36, scope: !5) +!20 = !DILocation(line: 42, column: 23, scope: !5) +!21 = !DILocation(line: 33, column: 27, scope: !5) +!22 = !DILocation(line: 34, column: 25, scope: !5) +!23 = !DILocation(line: 36, column: 34, scope: !5) +!24 = !DILocation(line: 36, column: 52, scope: !5) +!25 = !DILocation(line: 45, column: 40, scope: !5) +!26 = !DILocation(line: 233, column: 15, scope: !27, inlinedAt: !30) +!27 = distinct !DILexicalBlockFile(scope: !29, file: !28, discriminator: 0) +!28 = !DIFile(filename: "standard.py", directory: "/usr/local/lib/python3.10/dist-packages/triton/language") +!29 = distinct !DILexicalBlockFile(scope: !5, file: !28, discriminator: 0) +!30 = !DILocation(line: 243, column: 36, scope: !27, inlinedAt: !31) +!31 = !DILocation(line: 46, column: 27, scope: !27) +!32 = !DILocation(line: 243, column: 36, scope: !29, inlinedAt: !33) +!33 = !DILocation(line: 46, column: 27, scope: !29) +!34 = !DILocation(line: 52, column: 27, scope: !5) +!35 = !DILocation(line: 51, column: 36, scope: !5) +!36 = !DILocation(line: 53, column: 25, scope: !5) +!37 = !DILocation(line: 55, column: 41, scope: !5) +!38 = !DILocation(line: 55, column: 35, scope: !5) +!39 = !DILocation(line: 55, column: 53, scope: !5) +!40 = !DILocation(line: 55, column: 105, scope: !5) +!41 = !DILocation(line: 56, column: 35, scope: !5) +!42 = !DILocation(line: 56, column: 53, scope: !5) +!43 = !DILocation(line: 57, column: 35, scope: !5) +!44 = !DILocation(line: 57, column: 53, scope: !5) +!45 = !DILocation(line: 57, column: 105, scope: !5) +!46 = !DILocation(line: 63, column: 24, scope: !5) +!47 = !DILocation(line: 65, column: 23, scope: !5) +!48 = !DILocation(line: 66, column: 24, scope: !5) +!49 = !DILocation(line: 67, column: 24, scope: !5) +!50 = !DILocation(line: 69, column: 24, scope: !5) +!51 = !DILocation(line: 70, column: 29, scope: !5) +!52 = !DILocation(line: 70, column: 54, scope: !5) +!53 = !DILocation(line: 51, column: 4, scope: !5) diff --git a/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.ptx b/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.ptx new file mode 100644 index 0000000000000000000000000000000000000000..1cf146b9f52b6c78c86fa41fae3c86b9692cc4fe --- /dev/null +++ b/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.ptx @@ -0,0 +1,921 @@ +// +// Generated by LLVM NVPTX Back-End +// + +.version 8.2 +.target sm_89 +.address_size 64 + + // .globl triton__0d1d2d3d4d5d6d7de8 +.extern .shared .align 1 .b8 global_smem[]; + +.visible .entry triton__0d1d2d3d4d5d6d7de8( + .param .u64 triton__0d1d2d3d4d5d6d7de8_param_0, + .param .u64 triton__0d1d2d3d4d5d6d7de8_param_1, + .param .u64 triton__0d1d2d3d4d5d6d7de8_param_2, + .param .u64 triton__0d1d2d3d4d5d6d7de8_param_3, + .param .u64 triton__0d1d2d3d4d5d6d7de8_param_4, + .param .u64 triton__0d1d2d3d4d5d6d7de8_param_5, + .param .u64 triton__0d1d2d3d4d5d6d7de8_param_6, + .param .u64 triton__0d1d2d3d4d5d6d7de8_param_7, + .param .u64 triton__0d1d2d3d4d5d6d7de8_param_8 +) +.maxntid 256, 1, 1 +{ + .reg .pred %p<83>; + .reg .b16 %rs<65>; + .reg .b32 %r<104>; + .reg .f32 %f<164>; + .reg .b64 %rd<126>; + .loc 1 18 0 +$L__func_begin0: + .loc 1 18 0 + + ld.param.u64 %rd25, [triton__0d1d2d3d4d5d6d7de8_param_6]; + ld.param.u64 %rd24, [triton__0d1d2d3d4d5d6d7de8_param_5]; + ld.param.u64 %rd23, [triton__0d1d2d3d4d5d6d7de8_param_4]; + ld.param.u64 %rd31, [triton__0d1d2d3d4d5d6d7de8_param_0]; +$L__tmp0: + .loc 1 24 33 + mov.u32 %r1, %tid.x; + ld.param.u64 %rd32, [triton__0d1d2d3d4d5d6d7de8_param_1]; + shr.u32 %r2, %r1, 5; + ld.param.u64 %rd28, [triton__0d1d2d3d4d5d6d7de8_param_2]; + and.b32 %r9, %r1, 255; + ld.param.u64 %rd29, [triton__0d1d2d3d4d5d6d7de8_param_3]; + or.b32 %r10, %r9, 256; + or.b32 %r11, %r9, 512; + or.b32 %r12, %r9, 768; + or.b32 %r13, %r9, 1024; + or.b32 %r14, %r9, 1280; + or.b32 %r15, %r9, 1536; + or.b32 %r16, %r9, 1792; + .loc 1 21 28 + mov.u32 %r3, %ctaid.x; + cvt.u64.u32 %rd1, %r9; + cvt.u64.u32 %rd8, %r16; + cvt.u64.u32 %rd7, %r15; + cvt.u64.u32 %rd6, %r14; + cvt.u64.u32 %rd5, %r13; + cvt.u64.u32 %rd4, %r12; + cvt.u64.u32 %rd3, %r11; + cvt.u64.u32 %rd2, %r10; + .loc 1 26 30 + mul.wide.s32 %rd33, %r3, 8; + add.s64 %rd27, %rd32, %rd33; + mov.pred %p1, -1; + .loc 1 26 35 + mov.u64 %rd26, 0x0; + @%p1 ld.global.L1::evict_last.b64 { %rd26 }, [ %rd27 + 0 ]; + .loc 1 27 19 + mov.u32 %r7, 0x0; + @%p1 ld.global.b32 { %r7 }, [ %rd28 + 0 ]; + .loc 1 29 19 + mov.u32 %r8, 0x0; + @%p1 ld.global.b32 { %r8 }, [ %rd29 + 0 ]; + .loc 1 36 46 + mul.wide.s32 %rd9, %r3, 50257; + .loc 1 38 23 + setp.eq.s64 %p4, %rd26, -1; + .loc 1 39 22 + div.full.f32 %r6, %r7, %r8; + mov.b32 %f35, %r6; + .loc 1 41 37 + selp.f32 %f2, 0f00000000, %f35, %p4; + .loc 1 32 36 + shl.b64 %rd34, %rd9, 2; + add.s64 %rd10, %rd31, %rd34; + mov.f32 %f156, 0f00000000; + mov.u64 %rd124, 0; + mov.f32 %f157, %f156; + mov.f32 %f158, %f156; + mov.f32 %f159, %f156; + mov.f32 %f160, %f156; + mov.f32 %f161, %f156; + mov.f32 %f162, %f156; + mov.f32 %f163, %f156; +$L__BB0_1: + .loc 1 33 27 + or.b64 %rd43, %rd124, %rd1; + or.b64 %rd44, %rd124, %rd2; + or.b64 %rd45, %rd124, %rd3; + or.b64 %rd46, %rd124, %rd4; + or.b64 %rd47, %rd124, %rd5; + or.b64 %rd48, %rd124, %rd6; + or.b64 %rd49, %rd124, %rd7; + or.b64 %rd50, %rd124, %rd8; + .loc 1 34 25 + setp.lt.u64 %p20, %rd50, 50257; + setp.lt.u64 %p18, %rd49, 50257; + setp.lt.u64 %p16, %rd48, 50257; + setp.lt.u64 %p14, %rd47, 50257; + setp.lt.u64 %p12, %rd46, 50257; + setp.lt.u64 %p10, %rd45, 50257; + setp.lt.u64 %p8, %rd44, 50257; + setp.lt.u64 %p6, %rd43, 50257; + .loc 1 36 34 + shl.b64 %rd51, %rd43, 2; + add.s64 %rd35, %rd10, %rd51; + shl.b64 %rd52, %rd44, 2; + add.s64 %rd36, %rd10, %rd52; + shl.b64 %rd53, %rd45, 2; + add.s64 %rd37, %rd10, %rd53; + shl.b64 %rd54, %rd46, 2; + add.s64 %rd38, %rd10, %rd54; + shl.b64 %rd55, %rd47, 2; + add.s64 %rd39, %rd10, %rd55; + shl.b64 %rd56, %rd48, 2; + add.s64 %rd40, %rd10, %rd56; + shl.b64 %rd57, %rd49, 2; + add.s64 %rd41, %rd10, %rd57; + shl.b64 %rd58, %rd50, 2; + add.s64 %rd42, %rd10, %rd58; + mov.b32 %r71, 0; + .loc 1 36 52 + mov.u32 %r17, 0x0; + @%p6 ld.global.L1::evict_last.b32 { %r17 }, [ %rd35 + 0 ]; + @!%p6 mov.u32 %r17, %r71; + mov.u32 %r19, 0x0; + @%p8 ld.global.L1::evict_last.b32 { %r19 }, [ %rd36 + 0 ]; + @!%p8 mov.u32 %r19, %r71; + mov.u32 %r21, 0x0; + @%p10 ld.global.L1::evict_last.b32 { %r21 }, [ %rd37 + 0 ]; + @!%p10 mov.u32 %r21, %r71; + mov.u32 %r23, 0x0; + @%p12 ld.global.L1::evict_last.b32 { %r23 }, [ %rd38 + 0 ]; + @!%p12 mov.u32 %r23, %r71; + mov.u32 %r25, 0x0; + @%p14 ld.global.L1::evict_last.b32 { %r25 }, [ %rd39 + 0 ]; + @!%p14 mov.u32 %r25, %r71; + mov.u32 %r27, 0x0; + @%p16 ld.global.L1::evict_last.b32 { %r27 }, [ %rd40 + 0 ]; + @!%p16 mov.u32 %r27, %r71; + mov.u32 %r29, 0x0; + @%p18 ld.global.L1::evict_last.b32 { %r29 }, [ %rd41 + 0 ]; + @!%p18 mov.u32 %r29, %r71; + mov.u32 %r31, 0x0; + @%p20 ld.global.L1::evict_last.b32 { %r31 }, [ %rd42 + 0 ]; + @!%p20 mov.u32 %r31, %r71; + mov.b32 %f36, %r31; + mov.b32 %f37, %r29; + mov.b32 %f38, %r27; + mov.b32 %f39, %r25; + mov.b32 %f40, %r23; + mov.b32 %f41, %r21; + mov.b32 %f42, %r19; + mov.b32 %f43, %r17; + .loc 1 42 23 + mul.f32 %f44, %f2, %f43; + mul.f32 %f45, %f2, %f42; + mul.f32 %f46, %f2, %f41; + mul.f32 %f47, %f2, %f40; + mul.f32 %f48, %f2, %f39; + mul.f32 %f49, %f2, %f38; + mul.f32 %f50, %f2, %f37; + mul.f32 %f51, %f2, %f36; + .loc 1 45 40 + selp.f32 %f52, %f51, 0f80000000, %p20; + selp.f32 %f53, %f50, 0f80000000, %p18; + selp.f32 %f54, %f49, 0f80000000, %p16; + selp.f32 %f55, %f48, 0f80000000, %p14; + selp.f32 %f56, %f47, 0f80000000, %p12; + selp.f32 %f57, %f46, 0f80000000, %p10; + selp.f32 %f58, %f45, 0f80000000, %p8; + selp.f32 %f59, %f44, 0f80000000, %p6; + add.f32 %f156, %f156, %f59; + add.f32 %f157, %f157, %f58; + add.f32 %f158, %f158, %f57; + add.f32 %f159, %f159, %f56; + add.f32 %f160, %f160, %f55; + add.f32 %f161, %f161, %f54; + add.f32 %f162, %f162, %f53; + add.f32 %f163, %f163, %f52; + .loc 1 32 36 + add.s64 %rd124, %rd124, 2048; + cvt.u32.u64 %r33, %rd124; + add.s32 %r34, %r33, -2048; + setp.lt.u32 %p21, %r34, 48209; + @%p21 bra $L__BB0_1; + .loc 1 24 33 + and.b32 %r41, %r1, 31; + and.b32 %r42, %r2, 7; +$L__tmp1: + .loc 2 233 15 + add.f32 %f60, %f156, %f157; + add.f32 %f61, %f158, %f60; + add.f32 %f62, %f159, %f61; + add.f32 %f63, %f160, %f62; + add.f32 %f64, %f161, %f63; + add.f32 %f65, %f162, %f64; + add.f32 %f66, %f163, %f65; +$L__tmp2: + .loc 2 243 36 + mov.b32 %r43, %f66; + shfl.sync.bfly.b32 %r44, %r43, 16, 31, -1; + mov.b32 %f67, %r44; +$L__tmp3: + .loc 2 233 15 + add.f32 %f68, %f66, %f67; +$L__tmp4: + .loc 2 243 36 + mov.b32 %r45, %f68; + shfl.sync.bfly.b32 %r46, %r45, 8, 31, -1; + mov.b32 %f69, %r46; +$L__tmp5: + .loc 2 233 15 + add.f32 %f70, %f68, %f69; +$L__tmp6: + .loc 2 243 36 + mov.b32 %r47, %f70; + shfl.sync.bfly.b32 %r48, %r47, 4, 31, -1; + mov.b32 %f71, %r48; +$L__tmp7: + .loc 2 233 15 + add.f32 %f72, %f70, %f71; +$L__tmp8: + .loc 2 243 36 + mov.b32 %r49, %f72; + shfl.sync.bfly.b32 %r50, %r49, 2, 31, -1; + mov.b32 %f73, %r50; +$L__tmp9: + .loc 2 233 15 + add.f32 %f74, %f72, %f73; +$L__tmp10: + .loc 2 243 36 + mov.b32 %r51, %f74; + shfl.sync.bfly.b32 %r52, %r51, 1, 31, -1; + mov.b32 %f75, %r52; +$L__tmp11: + .loc 2 233 15 + add.f32 %f76, %f74, %f75; +$L__tmp12: + .loc 2 243 36 + setp.eq.s32 %p22, %r41, 0; + shl.b32 %r53, %r42, 2; + mov.u32 %r54, global_smem; + add.s32 %r35, %r54, %r53; + mov.b32 %r36, %f76; + @%p22 st.shared.b32 [ %r35 + 0 ], %r36; + bar.sync 0; + setp.lt.s32 %p23, %r1, 8; + shl.b32 %r55, %r1, 2; + add.s32 %r38, %r54, %r55; + @%p23 ld.shared.b32 %r37, [ %r38 + 0 ]; + mov.b32 %f77, %r37; + shfl.sync.bfly.b32 %r56, %r37, 4, 31, -1; + mov.b32 %f78, %r56; +$L__tmp13: + .loc 2 233 15 + add.f32 %f79, %f77, %f78; +$L__tmp14: + .loc 2 243 36 + mov.b32 %r57, %f79; + shfl.sync.bfly.b32 %r58, %r57, 2, 31, -1; + mov.b32 %f80, %r58; +$L__tmp15: + .loc 2 233 15 + add.f32 %f81, %f79, %f80; +$L__tmp16: + .loc 2 243 36 + mov.b32 %r59, %f81; + shfl.sync.bfly.b32 %r60, %r59, 1, 31, -1; + mov.b32 %f82, %r60; +$L__tmp17: + .loc 2 233 15 + add.f32 %f83, %f81, %f82; +$L__tmp18: + .loc 2 243 36 + and.b32 %r61, %r1, 7; + setp.eq.s32 %p25, %r61, 0; + and.pred %p24, %p23, %p25; + mov.b32 %r40, %f83; + @%p24 st.shared.b32 [ %r38 + 0 ], %r40; + bar.sync 0; + ld.shared.f32 %f26, [global_smem]; + mov.u64 %rd125, 0; + mov.u16 %rs2, 0; +$L__tmp19: +$L__BB0_3: + .loc 1 52 27 + or.b64 %rd92, %rd1, %rd125; + or.b64 %rd93, %rd2, %rd125; + or.b64 %rd94, %rd3, %rd125; + or.b64 %rd95, %rd4, %rd125; + or.b64 %rd96, %rd5, %rd125; + or.b64 %rd97, %rd6, %rd125; + or.b64 %rd98, %rd7, %rd125; + or.b64 %rd99, %rd8, %rd125; + .loc 1 53 25 + setp.lt.u64 %p26, %rd92, 50257; + setp.lt.u64 %p28, %rd93, 50257; + setp.lt.u64 %p30, %rd94, 50257; + setp.lt.u64 %p32, %rd95, 50257; + setp.lt.u64 %p34, %rd96, 50257; + setp.lt.u64 %p36, %rd97, 50257; + setp.lt.u64 %p38, %rd98, 50257; + setp.lt.u64 %p40, %rd99, 50257; + .loc 1 55 41 + add.s64 %rd100, %rd92, %rd9; + add.s64 %rd101, %rd93, %rd9; + add.s64 %rd102, %rd94, %rd9; + add.s64 %rd103, %rd95, %rd9; + add.s64 %rd104, %rd96, %rd9; + add.s64 %rd105, %rd97, %rd9; + add.s64 %rd106, %rd98, %rd9; + add.s64 %rd107, %rd99, %rd9; + .loc 1 55 35 + shl.b64 %rd108, %rd100, 1; + add.s64 %rd60, %rd23, %rd108; + shl.b64 %rd109, %rd101, 1; + add.s64 %rd61, %rd23, %rd109; + shl.b64 %rd110, %rd102, 1; + add.s64 %rd62, %rd23, %rd110; + shl.b64 %rd111, %rd103, 1; + add.s64 %rd63, %rd23, %rd111; + shl.b64 %rd112, %rd104, 1; + add.s64 %rd64, %rd23, %rd112; + shl.b64 %rd113, %rd105, 1; + add.s64 %rd65, %rd23, %rd113; + shl.b64 %rd114, %rd106, 1; + add.s64 %rd66, %rd23, %rd114; + shl.b64 %rd115, %rd107, 1; + add.s64 %rd67, %rd23, %rd115; + .loc 1 55 53 + mov.u16 %rs1, 0x0; + @%p26 ld.global.L1::evict_first.b16 { %rs1 }, [ %rd60 + 0 ]; + @!%p26 mov.u16 %rs1, %rs2; + mov.u16 %rs3, 0x0; + @%p28 ld.global.L1::evict_first.b16 { %rs3 }, [ %rd61 + 0 ]; + @!%p28 mov.u16 %rs3, %rs2; + mov.u16 %rs5, 0x0; + @%p30 ld.global.L1::evict_first.b16 { %rs5 }, [ %rd62 + 0 ]; + @!%p30 mov.u16 %rs5, %rs2; + mov.u16 %rs7, 0x0; + @%p32 ld.global.L1::evict_first.b16 { %rs7 }, [ %rd63 + 0 ]; + @!%p32 mov.u16 %rs7, %rs2; + mov.u16 %rs9, 0x0; + @%p34 ld.global.L1::evict_first.b16 { %rs9 }, [ %rd64 + 0 ]; + @!%p34 mov.u16 %rs9, %rs2; + mov.u16 %rs11, 0x0; + @%p36 ld.global.L1::evict_first.b16 { %rs11 }, [ %rd65 + 0 ]; + @!%p36 mov.u16 %rs11, %rs2; + mov.u16 %rs13, 0x0; + @%p38 ld.global.L1::evict_first.b16 { %rs13 }, [ %rd66 + 0 ]; + @!%p38 mov.u16 %rs13, %rs2; + mov.u16 %rs15, 0x0; + @%p40 ld.global.L1::evict_first.b16 { %rs15 }, [ %rd67 + 0 ]; + @!%p40 mov.u16 %rs15, %rs2; + .loc 1 55 105 + cvt.f32.bf16 %r62, %rs1; + mov.b32 %f100, %r62; + cvt.f32.bf16 %r63, %rs3; + mov.b32 %f101, %r63; + cvt.f32.bf16 %r64, %rs5; + mov.b32 %f102, %r64; + cvt.f32.bf16 %r65, %rs7; + mov.b32 %f103, %r65; + cvt.f32.bf16 %r66, %rs9; + mov.b32 %f104, %r66; + cvt.f32.bf16 %r67, %rs11; + mov.b32 %f105, %r67; + cvt.f32.bf16 %r68, %rs13; + mov.b32 %f106, %r68; + cvt.f32.bf16 %r69, %rs15; + mov.b32 %f107, %r69; + .loc 1 56 35 + shl.b64 %rd116, %rd92, 2; + add.s64 %rd68, %rd10, %rd116; + shl.b64 %rd117, %rd93, 2; + add.s64 %rd69, %rd10, %rd117; + shl.b64 %rd118, %rd94, 2; + add.s64 %rd70, %rd10, %rd118; + shl.b64 %rd119, %rd95, 2; + add.s64 %rd71, %rd10, %rd119; + shl.b64 %rd120, %rd96, 2; + add.s64 %rd72, %rd10, %rd120; + shl.b64 %rd121, %rd97, 2; + add.s64 %rd73, %rd10, %rd121; + shl.b64 %rd122, %rd98, 2; + add.s64 %rd74, %rd10, %rd122; + shl.b64 %rd123, %rd99, 2; + add.s64 %rd75, %rd10, %rd123; + .loc 1 56 53 + mov.u32 %r70, 0x0; + @%p26 ld.global.L1::evict_first.b32 { %r70 }, [ %rd68 + 0 ]; + @!%p26 mov.u32 %r70, %r71; + mov.b32 %f108, %r70; + mov.u32 %r72, 0x0; + @%p28 ld.global.L1::evict_first.b32 { %r72 }, [ %rd69 + 0 ]; + @!%p28 mov.u32 %r72, %r71; + mov.b32 %f109, %r72; + mov.u32 %r74, 0x0; + @%p30 ld.global.L1::evict_first.b32 { %r74 }, [ %rd70 + 0 ]; + @!%p30 mov.u32 %r74, %r71; + mov.b32 %f110, %r74; + mov.u32 %r76, 0x0; + @%p32 ld.global.L1::evict_first.b32 { %r76 }, [ %rd71 + 0 ]; + @!%p32 mov.u32 %r76, %r71; + mov.b32 %f111, %r76; + mov.u32 %r78, 0x0; + @%p34 ld.global.L1::evict_first.b32 { %r78 }, [ %rd72 + 0 ]; + @!%p34 mov.u32 %r78, %r71; + mov.b32 %f112, %r78; + mov.u32 %r80, 0x0; + @%p36 ld.global.L1::evict_first.b32 { %r80 }, [ %rd73 + 0 ]; + @!%p36 mov.u32 %r80, %r71; + mov.b32 %f113, %r80; + mov.u32 %r82, 0x0; + @%p38 ld.global.L1::evict_first.b32 { %r82 }, [ %rd74 + 0 ]; + @!%p38 mov.u32 %r82, %r71; + mov.b32 %f114, %r82; + mov.u32 %r84, 0x0; + @%p40 ld.global.L1::evict_first.b32 { %r84 }, [ %rd75 + 0 ]; + @!%p40 mov.u32 %r84, %r71; + mov.b32 %f115, %r84; + .loc 1 57 35 + add.s64 %rd76, %rd24, %rd108; + add.s64 %rd77, %rd24, %rd109; + add.s64 %rd78, %rd24, %rd110; + add.s64 %rd79, %rd24, %rd111; + add.s64 %rd80, %rd24, %rd112; + add.s64 %rd81, %rd24, %rd113; + add.s64 %rd82, %rd24, %rd114; + add.s64 %rd83, %rd24, %rd115; + .loc 1 57 53 + mov.u16 %rs25, 0x0; + @%p26 ld.global.L1::evict_first.b16 { %rs25 }, [ %rd76 + 0 ]; + @!%p26 mov.u16 %rs25, %rs2; + mov.u16 %rs27, 0x0; + @%p28 ld.global.L1::evict_first.b16 { %rs27 }, [ %rd77 + 0 ]; + @!%p28 mov.u16 %rs27, %rs2; + mov.u16 %rs29, 0x0; + @%p30 ld.global.L1::evict_first.b16 { %rs29 }, [ %rd78 + 0 ]; + @!%p30 mov.u16 %rs29, %rs2; + mov.u16 %rs31, 0x0; + @%p32 ld.global.L1::evict_first.b16 { %rs31 }, [ %rd79 + 0 ]; + @!%p32 mov.u16 %rs31, %rs2; + mov.u16 %rs33, 0x0; + @%p34 ld.global.L1::evict_first.b16 { %rs33 }, [ %rd80 + 0 ]; + @!%p34 mov.u16 %rs33, %rs2; + mov.u16 %rs35, 0x0; + @%p36 ld.global.L1::evict_first.b16 { %rs35 }, [ %rd81 + 0 ]; + @!%p36 mov.u16 %rs35, %rs2; + mov.u16 %rs37, 0x0; + @%p38 ld.global.L1::evict_first.b16 { %rs37 }, [ %rd82 + 0 ]; + @!%p38 mov.u16 %rs37, %rs2; + mov.u16 %rs39, 0x0; + @%p40 ld.global.L1::evict_first.b16 { %rs39 }, [ %rd83 + 0 ]; + @!%p40 mov.u16 %rs39, %rs2; + .loc 1 57 105 + cvt.f32.bf16 %r86, %rs25; + mov.b32 %f116, %r86; + cvt.f32.bf16 %r87, %rs27; + mov.b32 %f117, %r87; + cvt.f32.bf16 %r88, %rs29; + mov.b32 %f118, %r88; + cvt.f32.bf16 %r89, %rs31; + mov.b32 %f119, %r89; + cvt.f32.bf16 %r90, %rs33; + mov.b32 %f120, %r90; + cvt.f32.bf16 %r91, %rs35; + mov.b32 %f121, %r91; + cvt.f32.bf16 %r92, %rs37; + mov.b32 %f122, %r92; + cvt.f32.bf16 %r93, %rs39; + mov.b32 %f123, %r93; + .loc 1 65 23 + mul.f32 %f85, %f116, 0f3FB8AA3B; + ex2.approx.f32 %f84, %f85; + mul.f32 %f87, %f117, 0f3FB8AA3B; + ex2.approx.f32 %f86, %f87; + mul.f32 %f89, %f118, 0f3FB8AA3B; + ex2.approx.f32 %f88, %f89; + mul.f32 %f91, %f119, 0f3FB8AA3B; + ex2.approx.f32 %f90, %f91; + mul.f32 %f93, %f120, 0f3FB8AA3B; + ex2.approx.f32 %f92, %f93; + mul.f32 %f95, %f121, 0f3FB8AA3B; + ex2.approx.f32 %f94, %f95; + mul.f32 %f97, %f122, 0f3FB8AA3B; + ex2.approx.f32 %f96, %f97; + mul.f32 %f99, %f123, 0f3FB8AA3B; + ex2.approx.f32 %f98, %f99; + .loc 1 66 24 + mul.f32 %f124, %f26, %f84; + mul.f32 %f125, %f26, %f86; + mul.f32 %f126, %f26, %f88; + mul.f32 %f127, %f26, %f90; + mul.f32 %f128, %f26, %f92; + mul.f32 %f129, %f26, %f94; + mul.f32 %f130, %f26, %f96; + mul.f32 %f131, %f26, %f98; + .loc 1 67 24 + neg.f32 %f132, %f124; + fma.rn.f32 %f133, %f2, %f108, %f132; + neg.f32 %f134, %f125; + fma.rn.f32 %f135, %f2, %f109, %f134; + neg.f32 %f136, %f126; + fma.rn.f32 %f137, %f2, %f110, %f136; + neg.f32 %f138, %f127; + fma.rn.f32 %f139, %f2, %f111, %f138; + neg.f32 %f140, %f128; + fma.rn.f32 %f141, %f2, %f112, %f140; + neg.f32 %f142, %f129; + fma.rn.f32 %f143, %f2, %f113, %f142; + neg.f32 %f144, %f130; + fma.rn.f32 %f145, %f2, %f114, %f144; + neg.f32 %f146, %f131; + fma.rn.f32 %f147, %f2, %f115, %f146; + .loc 1 69 24 + add.f32 %f148, %f100, %f133; + add.f32 %f149, %f101, %f135; + add.f32 %f150, %f102, %f137; + add.f32 %f151, %f103, %f139; + add.f32 %f152, %f104, %f141; + add.f32 %f153, %f105, %f143; + add.f32 %f154, %f106, %f145; + add.f32 %f155, %f107, %f147; + .loc 1 70 29 + add.s64 %rd84, %rd25, %rd108; + add.s64 %rd85, %rd25, %rd109; + add.s64 %rd86, %rd25, %rd110; + add.s64 %rd87, %rd25, %rd111; + add.s64 %rd88, %rd25, %rd112; + add.s64 %rd89, %rd25, %rd113; + add.s64 %rd90, %rd25, %rd114; + add.s64 %rd91, %rd25, %rd115; + .loc 1 70 54 + mov.b32 %r94, %f148; + cvt.rn.bf16.f32 %rs49, %r94; + mov.b32 %r95, %f149; + cvt.rn.bf16.f32 %rs50, %r95; + mov.b32 %r96, %f150; + cvt.rn.bf16.f32 %rs51, %r96; + mov.b32 %r97, %f151; + cvt.rn.bf16.f32 %rs52, %r97; + mov.b32 %r98, %f152; + cvt.rn.bf16.f32 %rs53, %r98; + mov.b32 %r99, %f153; + cvt.rn.bf16.f32 %rs54, %r99; + mov.b32 %r100, %f154; + cvt.rn.bf16.f32 %rs55, %r100; + mov.b32 %r101, %f155; + cvt.rn.bf16.f32 %rs56, %r101; + @%p26 st.global.b16 [ %rd84 + 0 ], { %rs49 }; + @%p28 st.global.b16 [ %rd85 + 0 ], { %rs50 }; + @%p30 st.global.b16 [ %rd86 + 0 ], { %rs51 }; + @%p32 st.global.b16 [ %rd87 + 0 ], { %rs52 }; + @%p34 st.global.b16 [ %rd88 + 0 ], { %rs53 }; + @%p36 st.global.b16 [ %rd89 + 0 ], { %rs54 }; + @%p38 st.global.b16 [ %rd90 + 0 ], { %rs55 }; + @%p40 st.global.b16 [ %rd91 + 0 ], { %rs56 }; + .loc 1 51 36 + add.s64 %rd125, %rd125, 2048; + cvt.u32.u64 %r102, %rd125; + add.s32 %r103, %r102, -2048; + setp.lt.u32 %p82, %r103, 48209; + @%p82 bra $L__BB0_3; + .loc 1 51 4 + ret; +$L__tmp20: +$L__func_end0: + +} + .file 1 "/tmp/torchinductor_root/kz/ckzgl7thb4xdfkfnd2tidks6mt5f3hauwfyjflbtzyepo5oxkvhk.py" + .file 2 "/usr/local/lib/python3.10/dist-packages/triton/language/standard.py" + .section .debug_abbrev + { +.b8 1 +.b8 17 +.b8 1 +.b8 37 +.b8 8 +.b8 19 +.b8 5 +.b8 3 +.b8 8 +.b8 16 +.b8 6 +.b8 27 +.b8 8 +.b8 180 +.b8 66 +.b8 12 +.b8 17 +.b8 1 +.b8 18 +.b8 1 +.b8 0 +.b8 0 +.b8 2 +.b8 46 +.b8 0 +.b8 135 +.b8 64 +.b8 8 +.b8 3 +.b8 8 +.b8 58 +.b8 11 +.b8 59 +.b8 11 +.b8 63 +.b8 12 +.b8 32 +.b8 11 +.b8 0 +.b8 0 +.b8 3 +.b8 46 +.b8 1 +.b8 17 +.b8 1 +.b8 18 +.b8 1 +.b8 64 +.b8 10 +.b8 49 +.b8 19 +.b8 0 +.b8 0 +.b8 4 +.b8 29 +.b8 1 +.b8 49 +.b8 19 +.b8 17 +.b8 1 +.b8 18 +.b8 1 +.b8 88 +.b8 11 +.b8 89 +.b8 11 +.b8 87 +.b8 11 +.b8 0 +.b8 0 +.b8 5 +.b8 29 +.b8 0 +.b8 49 +.b8 19 +.b8 17 +.b8 1 +.b8 18 +.b8 1 +.b8 88 +.b8 11 +.b8 89 +.b8 11 +.b8 87 +.b8 11 +.b8 0 +.b8 0 +.b8 0 + } + .section .debug_info + { +.b32 278 +.b8 2 +.b8 0 +.b32 .debug_abbrev +.b8 8 +.b8 1 +.b8 116 +.b8 114 +.b8 105 +.b8 116 +.b8 111 +.b8 110 +.b8 0 +.b8 2 +.b8 0 +.b8 99 +.b8 107 +.b8 122 +.b8 103 +.b8 108 +.b8 55 +.b8 116 +.b8 104 +.b8 98 +.b8 52 +.b8 120 +.b8 100 +.b8 102 +.b8 107 +.b8 102 +.b8 110 +.b8 100 +.b8 50 +.b8 116 +.b8 105 +.b8 100 +.b8 107 +.b8 115 +.b8 54 +.b8 109 +.b8 116 +.b8 53 +.b8 102 +.b8 51 +.b8 104 +.b8 97 +.b8 117 +.b8 119 +.b8 102 +.b8 121 +.b8 106 +.b8 102 +.b8 108 +.b8 98 +.b8 116 +.b8 122 +.b8 121 +.b8 101 +.b8 112 +.b8 111 +.b8 53 +.b8 111 +.b8 120 +.b8 107 +.b8 118 +.b8 104 +.b8 107 +.b8 46 +.b8 112 +.b8 121 +.b8 0 +.b32 .debug_line +.b8 47 +.b8 116 +.b8 109 +.b8 112 +.b8 47 +.b8 116 +.b8 111 +.b8 114 +.b8 99 +.b8 104 +.b8 105 +.b8 110 +.b8 100 +.b8 117 +.b8 99 +.b8 116 +.b8 111 +.b8 114 +.b8 95 +.b8 114 +.b8 111 +.b8 111 +.b8 116 +.b8 47 +.b8 107 +.b8 122 +.b8 0 +.b8 1 +.b64 $L__func_begin0 +.b64 $L__func_end0 +.b8 2 +.b8 116 +.b8 114 +.b8 105 +.b8 116 +.b8 111 +.b8 110 +.b8 95 +.b8 95 +.b8 48 +.b8 100 +.b8 49 +.b8 100 +.b8 50 +.b8 100 +.b8 51 +.b8 100 +.b8 52 +.b8 100 +.b8 53 +.b8 100 +.b8 54 +.b8 100 +.b8 55 +.b8 100 +.b8 101 +.b8 56 +.b8 0 +.b8 116 +.b8 114 +.b8 105 +.b8 116 +.b8 111 +.b8 110 +.b8 95 +.b8 95 +.b8 48 +.b8 100 +.b8 49 +.b8 100 +.b8 50 +.b8 100 +.b8 51 +.b8 100 +.b8 52 +.b8 100 +.b8 53 +.b8 100 +.b8 54 +.b8 100 +.b8 55 +.b8 100 +.b8 101 +.b8 56 +.b8 0 +.b8 1 +.b8 18 +.b8 1 +.b8 1 +.b8 3 +.b64 $L__func_begin0 +.b64 $L__func_end0 +.b8 1 +.b8 156 +.b32 125 +.b8 4 +.b32 125 +.b64 $L__tmp1 +.b64 $L__tmp18 +.b8 2 +.b8 46 +.b8 27 +.b8 5 +.b32 125 +.b64 $L__tmp1 +.b64 $L__tmp18 +.b8 2 +.b8 243 +.b8 36 +.b8 0 +.b8 5 +.b32 125 +.b64 $L__tmp2 +.b64 $L__tmp19 +.b8 2 +.b8 46 +.b8 27 +.b8 0 +.b8 0 + } + .section .debug_pubnames + { +.b32 $L__pubNames_end0-$L__pubNames_start0 +$L__pubNames_start0: +.b8 2 +.b8 0 +.b32 .debug_info +.b32 282 +.b32 125 +.b8 116 +.b8 114 +.b8 105 +.b8 116 +.b8 111 +.b8 110 +.b8 95 +.b8 95 +.b8 48 +.b8 100 +.b8 49 +.b8 100 +.b8 50 +.b8 100 +.b8 51 +.b8 100 +.b8 52 +.b8 100 +.b8 53 +.b8 100 +.b8 54 +.b8 100 +.b8 55 +.b8 100 +.b8 101 +.b8 56 +.b8 0 +.b32 0 +$L__pubNames_end0: + } + .section .debug_pubtypes + { +.b32 $L__pubTypes_end0-$L__pubTypes_start0 +$L__pubTypes_start0: +.b8 2 +.b8 0 +.b32 .debug_info +.b32 282 +.b32 0 +$L__pubTypes_end0: + } + .section .debug_loc { } diff --git a/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.ttgir b/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.ttgir new file mode 100644 index 0000000000000000000000000000000000000000..ea84a19e67362c0c20c0c66eca3bf44a04c5a47c --- /dev/null +++ b/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.ttgir @@ -0,0 +1,81 @@ +#blocked = #triton_gpu.blocked<{sizePerThread = [1, 1], threadsPerWarp = [1, 32], warpsPerCTA = [1, 8], order = [1, 0], CTAsPerCGA = [1, 1], CTASplitNum = [1, 1], CTAOrder = [1, 0]}> +module attributes {"triton_gpu.compute-capability" = 89 : i32, "triton_gpu.num-ctas" = 1 : i32, "triton_gpu.num-warps" = 8 : i32, "triton_gpu.threads-per-warp" = 32 : i32} { + tt.func public @triton__0d1d2d3d4d5d6d7de8(%arg0: !tt.ptr {tt.divisibility = 16 : i32}, %arg1: !tt.ptr {tt.divisibility = 16 : i32}, %arg2: !tt.ptr {tt.divisibility = 16 : i32}, %arg3: !tt.ptr {tt.divisibility = 16 : i32}, %arg4: !tt.ptr {tt.divisibility = 16 : i32}, %arg5: !tt.ptr {tt.divisibility = 16 : i32}, %arg6: !tt.ptr {tt.divisibility = 16 : i32}, %arg7: i64 {tt.divisibility = 16 : i32, tt.max_divisibility = 16 : i32}, %arg8: i64) attributes {noinline = false} { + %cst = arith.constant dense<0.000000e+00> : tensor<1x1xf32, #blocked> + %cst_0 = arith.constant dense<-1> : tensor<1x1xi64, #blocked> + %cst_1 = arith.constant dense<0.000000e+00> : tensor<1x2048xf32, #blocked> + %cst_2 = arith.constant dense<50257> : tensor<1x2048xi64, #blocked> + %c0_i32 = arith.constant 0 : i32 + %c2048_i32 = arith.constant 2048 : i32 + %c50257_i32 = arith.constant 50257 : i32 + %c50257_i64 = arith.constant 50257 : i64 + %cst_3 = arith.constant dense<0.000000e+00> : tensor<1x2048xbf16, #blocked> + %0 = tt.get_program_id x : i32 + %1 = arith.extsi %0 : i32 to i64 + %2 = tt.make_range {end = 2048 : i32, start = 0 : i32} : tensor<2048xi32, #triton_gpu.slice<{dim = 0, parent = #blocked}>> + %3 = tt.expand_dims %2 {axis = 0 : i32} : (tensor<2048xi32, #triton_gpu.slice<{dim = 0, parent = #blocked}>>) -> tensor<1x2048xi32, #blocked> + %4 = arith.extsi %3 : tensor<1x2048xi32, #blocked> to tensor<1x2048xi64, #blocked> + %5 = tt.addptr %arg1, %1 : !tt.ptr, i64 + %6 = tt.splat %5 : (!tt.ptr) -> tensor<1x1x!tt.ptr, #blocked> + %7 = tt.load %6 {cache = 1 : i32, evict = 3 : i32, isVolatile = false} : tensor<1x1xi64, #blocked> + %8 = tt.addptr %arg2, %c0_i32 : !tt.ptr, i32 + %9 = tt.load %8 {cache = 1 : i32, evict = 1 : i32, isVolatile = false} : f32 + %10 = tt.addptr %arg3, %c0_i32 : !tt.ptr, i32 + %11 = tt.load %10 {cache = 1 : i32, evict = 1 : i32, isVolatile = false} : f32 + %12 = arith.muli %1, %c50257_i64 : i64 + %13 = tt.splat %12 : (i64) -> tensor<1x2048xi64, #blocked> + %14 = tt.splat %arg0 : (!tt.ptr) -> tensor<1x2048x!tt.ptr, #blocked> + %15 = arith.cmpi ne, %7, %cst_0 : tensor<1x1xi64, #blocked> + %16 = arith.divf %9, %11 : f32 + %17 = tt.splat %16 : (f32) -> tensor<1x1xf32, #blocked> + %18 = arith.select %15, %17, %cst : tensor<1x1xi1, #blocked>, tensor<1x1xf32, #blocked> + %19 = tt.broadcast %18 : (tensor<1x1xf32, #blocked>) -> tensor<1x2048xf32, #blocked> + %20 = scf.for %arg9 = %c0_i32 to %c50257_i32 step %c2048_i32 iter_args(%arg10 = %cst_1) -> (tensor<1x2048xf32, #blocked>) : i32 { + %27 = arith.extsi %arg9 : i32 to i64 + %28 = tt.splat %27 : (i64) -> tensor<1x2048xi64, #blocked> + %29 = arith.addi %28, %4 : tensor<1x2048xi64, #blocked> + %30 = arith.cmpi slt, %29, %cst_2 : tensor<1x2048xi64, #blocked> + %31 = arith.addi %29, %13 : tensor<1x2048xi64, #blocked> + %32 = tt.addptr %14, %31 : tensor<1x2048x!tt.ptr, #blocked>, tensor<1x2048xi64, #blocked> + %33 = tt.load %32, %30, %cst_1 {cache = 1 : i32, evict = 3 : i32, isVolatile = false} : tensor<1x2048xf32, #blocked> + %34 = arith.mulf %33, %19 : tensor<1x2048xf32, #blocked> + %35 = arith.addf %arg10, %34 : tensor<1x2048xf32, #blocked> + %36 = arith.select %30, %35, %arg10 : tensor<1x2048xi1, #blocked>, tensor<1x2048xf32, #blocked> + scf.yield %36 : tensor<1x2048xf32, #blocked> + } + %21 = "tt.reduce"(%20) <{axis = 1 : i32}> ({ + ^bb0(%arg9: f32, %arg10: f32): + %27 = arith.addf %arg9, %arg10 : f32 + tt.reduce.return %27 : f32 + }) : (tensor<1x2048xf32, #blocked>) -> tensor<1xf32, #triton_gpu.slice<{dim = 1, parent = #blocked}>> + %22 = tt.expand_dims %21 {axis = 1 : i32} : (tensor<1xf32, #triton_gpu.slice<{dim = 1, parent = #blocked}>>) -> tensor<1x1xf32, #blocked> + %23 = tt.splat %arg4 : (!tt.ptr) -> tensor<1x2048x!tt.ptr, #blocked> + %24 = tt.splat %arg5 : (!tt.ptr) -> tensor<1x2048x!tt.ptr, #blocked> + %25 = tt.broadcast %22 : (tensor<1x1xf32, #blocked>) -> tensor<1x2048xf32, #blocked> + %26 = tt.splat %arg6 : (!tt.ptr) -> tensor<1x2048x!tt.ptr, #blocked> + scf.for %arg9 = %c0_i32 to %c50257_i32 step %c2048_i32 : i32 { + %27 = arith.extsi %arg9 : i32 to i64 + %28 = tt.splat %27 : (i64) -> tensor<1x2048xi64, #blocked> + %29 = arith.addi %28, %4 : tensor<1x2048xi64, #blocked> + %30 = arith.cmpi slt, %29, %cst_2 : tensor<1x2048xi64, #blocked> + %31 = arith.addi %29, %13 : tensor<1x2048xi64, #blocked> + %32 = tt.addptr %23, %31 : tensor<1x2048x!tt.ptr, #blocked>, tensor<1x2048xi64, #blocked> + %33 = tt.load %32, %30, %cst_3 {cache = 1 : i32, evict = 2 : i32, isVolatile = false} : tensor<1x2048xbf16, #blocked> + %34 = arith.extf %33 : tensor<1x2048xbf16, #blocked> to tensor<1x2048xf32, #blocked> + %35 = tt.addptr %14, %31 : tensor<1x2048x!tt.ptr, #blocked>, tensor<1x2048xi64, #blocked> + %36 = tt.load %35, %30, %cst_1 {cache = 1 : i32, evict = 2 : i32, isVolatile = false} : tensor<1x2048xf32, #blocked> + %37 = tt.addptr %24, %31 : tensor<1x2048x!tt.ptr, #blocked>, tensor<1x2048xi64, #blocked> + %38 = tt.load %37, %30, %cst_3 {cache = 1 : i32, evict = 2 : i32, isVolatile = false} : tensor<1x2048xbf16, #blocked> + %39 = arith.extf %38 : tensor<1x2048xbf16, #blocked> to tensor<1x2048xf32, #blocked> + %40 = arith.mulf %36, %19 : tensor<1x2048xf32, #blocked> + %41 = math.exp %39 : tensor<1x2048xf32, #blocked> + %42 = arith.mulf %41, %25 : tensor<1x2048xf32, #blocked> + %43 = arith.subf %40, %42 : tensor<1x2048xf32, #blocked> + %44 = arith.addf %34, %43 : tensor<1x2048xf32, #blocked> + %45 = tt.addptr %26, %31 : tensor<1x2048x!tt.ptr, #blocked>, tensor<1x2048xi64, #blocked> + %46 = arith.truncf %44 : tensor<1x2048xf32, #blocked> to tensor<1x2048xbf16, #blocked> + tt.store %45, %46, %30 {cache = 1 : i32, evict = 1 : i32} : tensor<1x2048xbf16, #blocked> + } + tt.return + } +} diff --git a/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.ttir b/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.ttir new file mode 100644 index 0000000000000000000000000000000000000000..afa0c07dbfcaeddb384f05d34272cdb309bec890 --- /dev/null +++ b/.triton/dump/55fe15065c2876112e70d87fa8bae3d1/triton_.ttir @@ -0,0 +1,88 @@ +module { + tt.func public @triton__0d1d2d3d4d5d6d7de8(%arg0: !tt.ptr {tt.divisibility = 16 : i32}, %arg1: !tt.ptr {tt.divisibility = 16 : i32}, %arg2: !tt.ptr {tt.divisibility = 16 : i32}, %arg3: !tt.ptr {tt.divisibility = 16 : i32}, %arg4: !tt.ptr {tt.divisibility = 16 : i32}, %arg5: !tt.ptr {tt.divisibility = 16 : i32}, %arg6: !tt.ptr {tt.divisibility = 16 : i32}, %arg7: i64 {tt.divisibility = 16 : i32, tt.max_divisibility = 16 : i32}, %arg8: i64) attributes {noinline = false} { + %cst = arith.constant dense<0.000000e+00> : tensor<1x2048xbf16> + %cst_0 = arith.constant dense<0.000000e+00> : tensor<1x1xf32> + %c50257_i64 = arith.constant 50257 : i64 + %c50257_i32 = arith.constant 50257 : i32 + %c2048_i32 = arith.constant 2048 : i32 + %c0_i32 = arith.constant 0 : i32 + %cst_1 = arith.constant dense<50257> : tensor<1x2048xi64> + %cst_2 = arith.constant dense<-1> : tensor<1x1xi64> + %cst_3 = arith.constant dense<0.000000e+00> : tensor<1x2048xf32> + %0 = tt.get_program_id x : i32 + %1 = arith.extsi %0 : i32 to i64 + %2 = tt.make_range {end = 2048 : i32, start = 0 : i32} : tensor<2048xi32> + %3 = tt.expand_dims %2 {axis = 0 : i32} : (tensor<2048xi32>) -> tensor<1x2048xi32> + %4 = arith.extsi %3 : tensor<1x2048xi32> to tensor<1x2048xi64> + %5 = tt.addptr %arg1, %1 : !tt.ptr, i64 + %6 = tt.splat %5 : (!tt.ptr) -> tensor<1x1x!tt.ptr> + %7 = tt.load %6 {cache = 1 : i32, evict = 3 : i32, isVolatile = false} : tensor<1x1xi64> + %8 = tt.addptr %arg2, %c0_i32 : !tt.ptr, i32 + %9 = tt.load %8 {cache = 1 : i32, evict = 1 : i32, isVolatile = false} : f32 + %10 = tt.addptr %arg3, %c0_i32 : !tt.ptr, i32 + %11 = tt.load %10 {cache = 1 : i32, evict = 1 : i32, isVolatile = false} : f32 + %12 = arith.muli %1, %c50257_i64 : i64 + %13 = tt.splat %12 : (i64) -> tensor<1x2048xi64> + %14 = tt.splat %arg0 : (!tt.ptr) -> tensor<1x2048x!tt.ptr> + %15 = arith.cmpi ne, %7, %cst_2 : tensor<1x1xi64> + %16 = arith.divf %9, %11 : f32 + %17 = tt.splat %16 : (f32) -> tensor<1x1xf32> + %18 = arith.select %15, %17, %cst_0 : tensor<1x1xi1>, tensor<1x1xf32> + %19 = tt.broadcast %18 : (tensor<1x1xf32>) -> tensor<1x2048xf32> + %20 = scf.for %arg9 = %c0_i32 to %c50257_i32 step %c2048_i32 iter_args(%arg10 = %cst_3) -> (tensor<1x2048xf32>) : i32 { + %35 = arith.extsi %arg9 : i32 to i64 + %36 = tt.splat %35 : (i64) -> tensor<1x2048xi64> + %37 = arith.addi %36, %4 : tensor<1x2048xi64> + %38 = arith.cmpi slt, %37, %cst_1 : tensor<1x2048xi64> + %39 = arith.addi %37, %13 : tensor<1x2048xi64> + %40 = tt.addptr %14, %39 : tensor<1x2048x!tt.ptr>, tensor<1x2048xi64> + %41 = tt.load %40, %38, %cst_3 {cache = 1 : i32, evict = 3 : i32, isVolatile = false} : tensor<1x2048xf32> + %42 = arith.mulf %41, %19 : tensor<1x2048xf32> + %43 = arith.addf %arg10, %42 : tensor<1x2048xf32> + %44 = arith.select %38, %43, %arg10 : tensor<1x2048xi1>, tensor<1x2048xf32> + scf.yield %44 : tensor<1x2048xf32> + } + %21 = "tt.reduce"(%20) <{axis = 1 : i32}> ({ + ^bb0(%arg9: f32, %arg10: f32): + %35 = arith.addf %arg9, %arg10 : f32 + tt.reduce.return %35 : f32 + }) : (tensor<1x2048xf32>) -> tensor<1xf32> + %22 = tt.expand_dims %21 {axis = 1 : i32} : (tensor<1xf32>) -> tensor<1x1xf32> + %23 = arith.muli %1, %c50257_i64 : i64 + %24 = tt.splat %23 : (i64) -> tensor<1x2048xi64> + %25 = tt.splat %arg4 : (!tt.ptr) -> tensor<1x2048x!tt.ptr> + %26 = tt.splat %arg0 : (!tt.ptr) -> tensor<1x2048x!tt.ptr> + %27 = tt.splat %arg5 : (!tt.ptr) -> tensor<1x2048x!tt.ptr> + %28 = arith.cmpi ne, %7, %cst_2 : tensor<1x1xi64> + %29 = arith.divf %9, %11 : f32 + %30 = tt.splat %29 : (f32) -> tensor<1x1xf32> + %31 = arith.select %28, %30, %cst_0 : tensor<1x1xi1>, tensor<1x1xf32> + %32 = tt.broadcast %31 : (tensor<1x1xf32>) -> tensor<1x2048xf32> + %33 = tt.broadcast %22 : (tensor<1x1xf32>) -> tensor<1x2048xf32> + %34 = tt.splat %arg6 : (!tt.ptr) -> tensor<1x2048x!tt.ptr> + scf.for %arg9 = %c0_i32 to %c50257_i32 step %c2048_i32 : i32 { + %35 = arith.extsi %arg9 : i32 to i64 + %36 = tt.splat %35 : (i64) -> tensor<1x2048xi64> + %37 = arith.addi %36, %4 : tensor<1x2048xi64> + %38 = arith.cmpi slt, %37, %cst_1 : tensor<1x2048xi64> + %39 = arith.addi %37, %24 : tensor<1x2048xi64> + %40 = tt.addptr %25, %39 : tensor<1x2048x!tt.ptr>, tensor<1x2048xi64> + %41 = tt.load %40, %38, %cst {cache = 1 : i32, evict = 2 : i32, isVolatile = false} : tensor<1x2048xbf16> + %42 = arith.extf %41 : tensor<1x2048xbf16> to tensor<1x2048xf32> + %43 = tt.addptr %26, %39 : tensor<1x2048x!tt.ptr>, tensor<1x2048xi64> + %44 = tt.load %43, %38, %cst_3 {cache = 1 : i32, evict = 2 : i32, isVolatile = false} : tensor<1x2048xf32> + %45 = tt.addptr %27, %39 : tensor<1x2048x!tt.ptr>, tensor<1x2048xi64> + %46 = tt.load %45, %38, %cst {cache = 1 : i32, evict = 2 : i32, isVolatile = false} : tensor<1x2048xbf16> + %47 = arith.extf %46 : tensor<1x2048xbf16> to tensor<1x2048xf32> + %48 = arith.mulf %44, %32 : tensor<1x2048xf32> + %49 = math.exp %47 : tensor<1x2048xf32> + %50 = arith.mulf %49, %33 : tensor<1x2048xf32> + %51 = arith.subf %48, %50 : tensor<1x2048xf32> + %52 = arith.addf %42, %51 : tensor<1x2048xf32> + %53 = tt.addptr %34, %39 : tensor<1x2048x!tt.ptr>, tensor<1x2048xi64> + %54 = arith.truncf %52 : tensor<1x2048xf32> to tensor<1x2048xbf16> + tt.store %53, %54, %38 {cache = 1 : i32, evict = 1 : i32} : tensor<1x2048xbf16> + } + tt.return + } +} diff --git a/.triton/dump/884b5df35d2a25fd91308249e7657806/triton_.cubin b/.triton/dump/884b5df35d2a25fd91308249e7657806/triton_.cubin new file mode 100644 index 0000000000000000000000000000000000000000..e7124f53b3bf65fbdd5f76e1c5772593efec56e4 Binary files /dev/null and b/.triton/dump/884b5df35d2a25fd91308249e7657806/triton_.cubin differ diff --git a/.triton/dump/884b5df35d2a25fd91308249e7657806/triton_.ptx b/.triton/dump/884b5df35d2a25fd91308249e7657806/triton_.ptx new file mode 100644 index 0000000000000000000000000000000000000000..b7d1d4fd6aa2b35a87b85c220f6abdb861ef8b49 --- /dev/null +++ b/.triton/dump/884b5df35d2a25fd91308249e7657806/triton_.ptx @@ -0,0 +1,280 @@ +// +// Generated by LLVM NVPTX Back-End +// + +.version 8.2 +.target sm_89 +.address_size 64 + + // .globl triton__0d1de + +.visible .entry triton__0d1de( + .param .u64 triton__0d1de_param_0, + .param .u64 triton__0d1de_param_1 +) +.maxntid 128, 1, 1 +{ + .reg .pred %p<3>; + .reg .b32 %r<13>; + .reg .b64 %rd<8>; + .loc 1 18 0 +$L__func_begin0: + .loc 1 18 0 + + ld.param.u64 %rd3, [triton__0d1de_param_0]; +$L__tmp0: + .loc 1 21 36 + mov.u32 %r10, %tid.x; + shl.b32 %r11, %r10, 2; + and.b32 %r12, %r11, 508; + .loc 1 20 28 + mov.u32 %r1, %ctaid.x; + .loc 1 20 46 + mul.wide.s32 %rd4, %r1, 1024; + cvt.u64.u32 %rd5, %r12; + .loc 1 21 23 + or.b64 %rd6, %rd4, %rd5; + .loc 1 25 25 + shl.b64 %rd7, %rd6, 2; + add.s64 %rd1, %rd3, %rd7; + add.s64 %rd2, %rd1, 2048; + mov.b32 %r2, 0; + mov.pred %p1, -1; + .loc 1 25 36 + @%p1 st.global.v4.b32 [ %rd1 + 0 ], { %r2, %r2, %r2, %r2 }; + @%p1 st.global.v4.b32 [ %rd2 + 0 ], { %r2, %r2, %r2, %r2 }; + .loc 1 25 4 + ret; +$L__tmp1: +$L__func_end0: + +} + .file 1 "/tmp/torchinductor_root/pk/cpkw3bdoamlgzvqjeyuk34b3jcjf57htisara7lukflexo3t22ew.py" + .section .debug_abbrev + { +.b8 1 +.b8 17 +.b8 1 +.b8 37 +.b8 8 +.b8 19 +.b8 5 +.b8 3 +.b8 8 +.b8 16 +.b8 6 +.b8 27 +.b8 8 +.b8 180 +.b8 66 +.b8 12 +.b8 17 +.b8 1 +.b8 18 +.b8 1 +.b8 0 +.b8 0 +.b8 2 +.b8 46 +.b8 0 +.b8 17 +.b8 1 +.b8 18 +.b8 1 +.b8 64 +.b8 10 +.b8 135 +.b8 64 +.b8 8 +.b8 3 +.b8 8 +.b8 58 +.b8 11 +.b8 59 +.b8 11 +.b8 63 +.b8 12 +.b8 0 +.b8 0 +.b8 0 + } + .section .debug_info + { +.b32 172 +.b8 2 +.b8 0 +.b32 .debug_abbrev +.b8 8 +.b8 1 +.b8 116 +.b8 114 +.b8 105 +.b8 116 +.b8 111 +.b8 110 +.b8 0 +.b8 2 +.b8 0 +.b8 99 +.b8 112 +.b8 107 +.b8 119 +.b8 51 +.b8 98 +.b8 100 +.b8 111 +.b8 97 +.b8 109 +.b8 108 +.b8 103 +.b8 122 +.b8 118 +.b8 113 +.b8 106 +.b8 101 +.b8 121 +.b8 117 +.b8 107 +.b8 51 +.b8 52 +.b8 98 +.b8 51 +.b8 106 +.b8 99 +.b8 106 +.b8 102 +.b8 53 +.b8 55 +.b8 104 +.b8 116 +.b8 105 +.b8 115 +.b8 97 +.b8 114 +.b8 97 +.b8 55 +.b8 108 +.b8 117 +.b8 107 +.b8 102 +.b8 108 +.b8 101 +.b8 120 +.b8 111 +.b8 51 +.b8 116 +.b8 50 +.b8 50 +.b8 101 +.b8 119 +.b8 46 +.b8 112 +.b8 121 +.b8 0 +.b32 .debug_line +.b8 47 +.b8 116 +.b8 109 +.b8 112 +.b8 47 +.b8 116 +.b8 111 +.b8 114 +.b8 99 +.b8 104 +.b8 105 +.b8 110 +.b8 100 +.b8 117 +.b8 99 +.b8 116 +.b8 111 +.b8 114 +.b8 95 +.b8 114 +.b8 111 +.b8 111 +.b8 116 +.b8 47 +.b8 112 +.b8 107 +.b8 0 +.b8 1 +.b64 $L__func_begin0 +.b64 $L__func_end0 +.b8 2 +.b64 $L__func_begin0 +.b64 $L__func_end0 +.b8 1 +.b8 156 +.b8 116 +.b8 114 +.b8 105 +.b8 116 +.b8 111 +.b8 110 +.b8 95 +.b8 95 +.b8 48 +.b8 100 +.b8 49 +.b8 100 +.b8 101 +.b8 0 +.b8 116 +.b8 114 +.b8 105 +.b8 116 +.b8 111 +.b8 110 +.b8 95 +.b8 95 +.b8 48 +.b8 100 +.b8 49 +.b8 100 +.b8 101 +.b8 0 +.b8 1 +.b8 18 +.b8 1 +.b8 0 + } + .section .debug_pubnames + { +.b32 $L__pubNames_end0-$L__pubNames_start0 +$L__pubNames_start0: +.b8 2 +.b8 0 +.b32 .debug_info +.b32 176 +.b32 125 +.b8 116 +.b8 114 +.b8 105 +.b8 116 +.b8 111 +.b8 110 +.b8 95 +.b8 95 +.b8 48 +.b8 100 +.b8 49 +.b8 100 +.b8 101 +.b8 0 +.b32 0 +$L__pubNames_end0: + } + .section .debug_pubtypes + { +.b32 $L__pubTypes_end0-$L__pubTypes_start0 +$L__pubTypes_start0: +.b8 2 +.b8 0 +.b32 .debug_info +.b32 176 +.b32 0 +$L__pubTypes_end0: + } + .section .debug_loc { } diff --git a/.triton/dump/94361ae8a918b76700c87078e3d5a751/triton_.cubin b/.triton/dump/94361ae8a918b76700c87078e3d5a751/triton_.cubin new file mode 100644 index 0000000000000000000000000000000000000000..e4d7b082c84c0f0097feec2ee203b070ebdef67c Binary files /dev/null and b/.triton/dump/94361ae8a918b76700c87078e3d5a751/triton_.cubin differ diff --git a/.triton/dump/94361ae8a918b76700c87078e3d5a751/triton_.llir b/.triton/dump/94361ae8a918b76700c87078e3d5a751/triton_.llir new file mode 100644 index 0000000000000000000000000000000000000000..5a3dbda459cef5c45b27655c23d3e096a901c49f --- /dev/null +++ b/.triton/dump/94361ae8a918b76700c87078e3d5a751/triton_.llir @@ -0,0 +1,166 @@ +; ModuleID = 'LLVMDialectModule' +source_filename = "LLVMDialectModule" + +@global_smem = external local_unnamed_addr addrspace(3) global [0 x i8] + +define void @triton__0d1d2de(ptr addrspace(1) %0, ptr addrspace(1) %1, i32 %2) local_unnamed_addr !dbg !5 { + %4 = tail call i32 @llvm.nvvm.read.ptx.sreg.tid.x(), !dbg !8 + %5 = and i32 %4, 127, !dbg !8 + %6 = shl nuw nsw i32 %5, 3, !dbg !8 + %7 = shl nuw nsw i32 %5, 2, !dbg !8 + %8 = or i32 %7, 512, !dbg !8 + %9 = tail call i32 asm "mov.u32 $0, %ctaid.x;", "=r"() #2, !dbg !9 + %10 = shl i32 %9, 10, !dbg !10 + %11 = or i32 %10, %6, !dbg !11 + %12 = or i32 %10, %7, !dbg !11 + %13 = or i32 %10, %8, !dbg !11 + %14 = icmp slt i32 %11, 12865792, !dbg !12 + %15 = icmp slt i32 %12, 12865792, !dbg !12 + %16 = icmp slt i32 %13, 12865792, !dbg !12 + %17 = sext i32 %11 to i64, !dbg !13 + %18 = getelementptr i16, ptr addrspace(1) %0, i64 %17, !dbg !13 + %19 = tail call { i32, i32, i32, i32 } asm sideeffect "mov.u32 $0, 0x0;\0A\09mov.u32 $1, 0x0;\0A\09mov.u32 $2, 0x0;\0A\09mov.u32 $3, 0x0;\0A\09@$5 ld.global.v4.b32 { $0, $1, $2, $3 }, [ $4 + 0 ];", "=r,=r,=r,=r,l,b"(ptr addrspace(1) %18, i1 %14) #2, !dbg !14 + %20 = extractvalue { i32, i32, i32, i32 } %19, 0, !dbg !14 + %21 = extractvalue { i32, i32, i32, i32 } %19, 1, !dbg !14 + %22 = extractvalue { i32, i32, i32, i32 } %19, 2, !dbg !14 + %23 = extractvalue { i32, i32, i32, i32 } %19, 3, !dbg !14 + %24 = trunc i32 %20 to i16, !dbg !14 + %extelt.offset = lshr i32 %20, 16, !dbg !14 + %25 = trunc i32 %extelt.offset to i16, !dbg !14 + %26 = trunc i32 %21 to i16, !dbg !14 + %extelt.offset1 = lshr i32 %21, 16, !dbg !14 + %27 = trunc i32 %extelt.offset1 to i16, !dbg !14 + %28 = trunc i32 %22 to i16, !dbg !14 + %extelt.offset2 = lshr i32 %22, 16, !dbg !14 + %29 = trunc i32 %extelt.offset2 to i16, !dbg !14 + %30 = trunc i32 %23 to i16, !dbg !14 + %extelt.offset3 = lshr i32 %23, 16, !dbg !14 + %31 = trunc i32 %extelt.offset3 to i16, !dbg !14 + %32 = zext nneg i32 %6 to i64, !dbg !15 + %33 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %32, !dbg !15 + %34 = insertelement <1 x i16> undef, i16 %24, i64 0, !dbg !15 + store <1 x i16> %34, ptr addrspace(3) %33, align 2, !dbg !15 + %35 = or i32 %6, 1, !dbg !15 + %36 = zext nneg i32 %35 to i64, !dbg !15 + %37 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %36, !dbg !15 + %38 = insertelement <1 x i16> undef, i16 %25, i64 0, !dbg !15 + store <1 x i16> %38, ptr addrspace(3) %37, align 2, !dbg !15 + %39 = or i32 %6, 2, !dbg !15 + %40 = zext nneg i32 %39 to i64, !dbg !15 + %41 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %40, !dbg !15 + %42 = insertelement <1 x i16> undef, i16 %26, i64 0, !dbg !15 + store <1 x i16> %42, ptr addrspace(3) %41, align 2, !dbg !15 + %43 = or i32 %6, 3, !dbg !15 + %44 = zext nneg i32 %43 to i64, !dbg !15 + %45 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %44, !dbg !15 + %46 = insertelement <1 x i16> undef, i16 %27, i64 0, !dbg !15 + store <1 x i16> %46, ptr addrspace(3) %45, align 2, !dbg !15 + %47 = or i32 %6, 4, !dbg !15 + %48 = zext nneg i32 %47 to i64, !dbg !15 + %49 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %48, !dbg !15 + %50 = insertelement <1 x i16> undef, i16 %28, i64 0, !dbg !15 + store <1 x i16> %50, ptr addrspace(3) %49, align 2, !dbg !15 + %51 = or i32 %6, 5, !dbg !15 + %52 = zext nneg i32 %51 to i64, !dbg !15 + %53 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %52, !dbg !15 + %54 = insertelement <1 x i16> undef, i16 %29, i64 0, !dbg !15 + store <1 x i16> %54, ptr addrspace(3) %53, align 2, !dbg !15 + %55 = or i32 %6, 6, !dbg !15 + %56 = zext nneg i32 %55 to i64, !dbg !15 + %57 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %56, !dbg !15 + %58 = insertelement <1 x i16> undef, i16 %30, i64 0, !dbg !15 + store <1 x i16> %58, ptr addrspace(3) %57, align 2, !dbg !15 + %59 = or i32 %6, 7, !dbg !15 + %60 = zext nneg i32 %59 to i64, !dbg !15 + %61 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %60, !dbg !15 + %62 = insertelement <1 x i16> undef, i16 %31, i64 0, !dbg !15 + store <1 x i16> %62, ptr addrspace(3) %61, align 2, !dbg !15 + tail call void @llvm.nvvm.barrier0(), !dbg !15 + %63 = zext nneg i32 %7 to i64, !dbg !15 + %64 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %63, !dbg !15 + %65 = load i16, ptr addrspace(3) %64, align 2, !dbg !15 + %66 = or i32 %7, 1, !dbg !15 + %67 = zext nneg i32 %66 to i64, !dbg !15 + %68 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %67, !dbg !15 + %69 = load i16, ptr addrspace(3) %68, align 2, !dbg !15 + %70 = or i32 %7, 2, !dbg !15 + %71 = zext nneg i32 %70 to i64, !dbg !15 + %72 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %71, !dbg !15 + %73 = load i16, ptr addrspace(3) %72, align 2, !dbg !15 + %74 = or i32 %7, 3, !dbg !15 + %75 = zext nneg i32 %74 to i64, !dbg !15 + %76 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %75, !dbg !15 + %77 = load i16, ptr addrspace(3) %76, align 2, !dbg !15 + %78 = zext nneg i32 %8 to i64, !dbg !15 + %79 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %78, !dbg !15 + %80 = load i16, ptr addrspace(3) %79, align 2, !dbg !15 + %81 = or i32 %7, 513, !dbg !15 + %82 = zext nneg i32 %81 to i64, !dbg !15 + %83 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %82, !dbg !15 + %84 = load i16, ptr addrspace(3) %83, align 2, !dbg !15 + %85 = or i32 %7, 514, !dbg !15 + %86 = zext nneg i32 %85 to i64, !dbg !15 + %87 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %86, !dbg !15 + %88 = load i16, ptr addrspace(3) %87, align 2, !dbg !15 + %89 = or i32 %7, 515, !dbg !15 + %90 = zext nneg i32 %89 to i64, !dbg !15 + %91 = getelementptr i16, ptr addrspace(3) @global_smem, i64 %90, !dbg !15 + %92 = load i16, ptr addrspace(3) %91, align 2, !dbg !15 + %93 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %65) #2, !dbg !15 + %94 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %69) #2, !dbg !15 + %95 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %73) #2, !dbg !15 + %96 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %77) #2, !dbg !15 + %97 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %80) #2, !dbg !15 + %98 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %84) #2, !dbg !15 + %99 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %88) #2, !dbg !15 + %100 = tail call float asm "cvt.f32.bf16 $0, $1;", "=r,h"(i16 %92) #2, !dbg !15 + %101 = sext i32 %12 to i64, !dbg !16 + %102 = getelementptr float, ptr addrspace(1) %1, i64 %101, !dbg !16 + %103 = sext i32 %13 to i64, !dbg !16 + %104 = getelementptr float, ptr addrspace(1) %1, i64 %103, !dbg !16 + %105 = bitcast float %93 to i32, !dbg !17 + %106 = bitcast float %94 to i32, !dbg !17 + %107 = bitcast float %95 to i32, !dbg !17 + %108 = bitcast float %96 to i32, !dbg !17 + tail call void asm sideeffect "@$5 st.global.v4.b32 [ $4 + 0 ], { $0, $1, $2, $3 };", "r,r,r,r,l,b"(i32 %105, i32 %106, i32 %107, i32 %108, ptr addrspace(1) %102, i1 %15) #2, !dbg !17 + %109 = bitcast float %97 to i32, !dbg !17 + %110 = bitcast float %98 to i32, !dbg !17 + %111 = bitcast float %99 to i32, !dbg !17 + %112 = bitcast float %100 to i32, !dbg !17 + tail call void asm sideeffect "@$5 st.global.v4.b32 [ $4 + 0 ], { $0, $1, $2, $3 };", "r,r,r,r,l,b"(i32 %109, i32 %110, i32 %111, i32 %112, ptr addrspace(1) %104, i1 %16) #2, !dbg !17 + ret void, !dbg !18 +} + +; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare noundef i32 @llvm.nvvm.read.ptx.sreg.tid.x() #0 + +; Function Attrs: convergent nocallback nounwind +declare void @llvm.nvvm.barrier0() #1 + +attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #1 = { convergent nocallback nounwind } +attributes #2 = { nounwind } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!nvvm.annotations = !{!3, !4, !4, !3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_C, file: !2, producer: "triton", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "cmxm2obucqff2z4vc55zcnscfuvur5s2b3e36dvgm57qobanlpho.py", directory: "/tmp/torchinductor_root/mx") +!3 = !{ptr @triton__0d1d2de, !"kernel", i32 1} +!4 = !{ptr @triton__0d1d2de, !"maxntidx", i32 128} +!5 = distinct !DISubprogram(name: "triton__0d1d2de", linkageName: "triton__0d1d2de", scope: !2, file: !2, line: 18, type: !6, scopeLine: 18, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !1) +!6 = !DISubroutineType(cc: DW_CC_normal, types: !7) +!7 = !{} +!8 = !DILocation(line: 21, column: 36, scope: !5) +!9 = !DILocation(line: 20, column: 28, scope: !5) +!10 = !DILocation(line: 20, column: 33, scope: !5) +!11 = !DILocation(line: 21, column: 23, scope: !5) +!12 = !DILocation(line: 22, column: 21, scope: !5) +!13 = !DILocation(line: 24, column: 30, scope: !5) +!14 = !DILocation(line: 24, column: 35, scope: !5) +!15 = !DILocation(line: 24, column: 45, scope: !5) +!16 = !DILocation(line: 26, column: 25, scope: !5) +!17 = !DILocation(line: 26, column: 36, scope: !5) +!18 = !DILocation(line: 26, column: 4, scope: !5)