From 2963047e8a1354b4c445c3d071807f4bd255fc44 Mon Sep 17 00:00:00 2001 From: Saimanas Enduri Date: Fri, 11 Oct 2024 23:10:53 +0000 Subject: [PATCH] remove license from each file and update with permalink for sources --- kernels/test_flash-attention.py | 26 +------------------------- kernels/test_layernorm.py | 26 +------------------------- kernels/test_matmul.py | 26 +------------------------- kernels/test_rmsnorm.py | 26 +------------------------- kernels/test_softmax.py | 26 +------------------------- 5 files changed, 5 insertions(+), 125 deletions(-) diff --git a/kernels/test_flash-attention.py b/kernels/test_flash-attention.py index eefb6de..8dd22de 100644 --- a/kernels/test_flash-attention.py +++ b/kernels/test_flash-attention.py @@ -1,32 +1,8 @@ """ -/* -* Copyright 2018-2020 Philippe Tillet -* Copyright 2020-2022 OpenAI -* -* Permission is hereby granted, free of charge, to any person obtaining -* a copy of this software and associated documentation files -* (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, -* publish, distribute, sublicense, and/or sell copies of the Software, -* and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* -* The above copyright notice and this permission notice shall be -* included in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - Fused Attention =============== -Source: https://github.com/ROCm/triton/blob/main_perf/python/perf-kernels/flash-attention.py +Source: https://github.com/ROCm/triton/blob/b36e072fc52e4a9d2222460519f4a8ff669d0f7e/python/perf-kernels/flash-attention.py This is a Triton implementation of the Flash Attention v2 algorithm See https://tridao.me/publications/flash2/flash2.pdf diff --git a/kernels/test_layernorm.py b/kernels/test_layernorm.py index 4ac130d..7d3f252 100644 --- a/kernels/test_layernorm.py +++ b/kernels/test_layernorm.py @@ -1,32 +1,8 @@ """ -/* -* Copyright 2018-2020 Philippe Tillet -* Copyright 2020-2022 OpenAI -* -* Permission is hereby granted, free of charge, to any person obtaining -* a copy of this software and associated documentation files -* (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, -* publish, distribute, sublicense, and/or sell copies of the Software, -* and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* -* The above copyright notice and this permission notice shall be -* included in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - Layernorm =============== -Source: https://github.com/ROCm/triton/blob/main_perf/python/perf-kernels/flash-attention.py +Source: https://github.com/ROCm/triton/blob/b36e072fc52e4a9d2222460519f4a8ff669d0f7e/python/perf-kernels/layernorm.py """ import argparse diff --git a/kernels/test_matmul.py b/kernels/test_matmul.py index e13a25c..e770cbd 100644 --- a/kernels/test_matmul.py +++ b/kernels/test_matmul.py @@ -1,32 +1,8 @@ """ -/* -* Copyright 2018-2020 Philippe Tillet -* Copyright 2020-2022 OpenAI -* -* Permission is hereby granted, free of charge, to any person obtaining -* a copy of this software and associated documentation files -* (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, -* publish, distribute, sublicense, and/or sell copies of the Software, -* and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* -* The above copyright notice and this permission notice shall be -* included in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - Matmul =============== -Source: https://github.com/ROCm/triton/blob/main_perf/python/perf-kernels/03-matrix-multiplication-all-types.py +Source: https://github.com/ROCm/triton/blob/b36e072fc52e4a9d2222460519f4a8ff669d0f7e/python/perf-kernels/03-matrix-multiplication-all-types.py """ import torch diff --git a/kernels/test_rmsnorm.py b/kernels/test_rmsnorm.py index 00a04b4..662c2e4 100644 --- a/kernels/test_rmsnorm.py +++ b/kernels/test_rmsnorm.py @@ -1,32 +1,8 @@ """ -/* -* Copyright 2018-2020 Philippe Tillet -* Copyright 2020-2022 OpenAI -* -* Permission is hereby granted, free of charge, to any person obtaining -* a copy of this software and associated documentation files -* (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, -* publish, distribute, sublicense, and/or sell copies of the Software, -* and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* -* The above copyright notice and this permission notice shall be -* included in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - rmsnorm =============== -Source: https://github.com/ROCm/triton/blob/main_perf/python/perf-kernels/rmsnorm.py +Source: https://github.com/ROCm/triton/blob/b36e072fc52e4a9d2222460519f4a8ff669d0f7e/python/perf-kernels/rmsnorm.py """ import argparse diff --git a/kernels/test_softmax.py b/kernels/test_softmax.py index b5c2c1f..91a22cc 100644 --- a/kernels/test_softmax.py +++ b/kernels/test_softmax.py @@ -1,32 +1,8 @@ """ -/* -* Copyright 2018-2020 Philippe Tillet -* Copyright 2020-2022 OpenAI -* -* Permission is hereby granted, free of charge, to any person obtaining -* a copy of this software and associated documentation files -* (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, -* publish, distribute, sublicense, and/or sell copies of the Software, -* and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* -* The above copyright notice and this permission notice shall be -* included in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - Softmax =============== -Source: https://github.com/ROCm/triton/blob/main_perf/python/perf-kernels/softmax.py +Source: https://github.com/ROCm/triton/blob/b36e072fc52e4a9d2222460519f4a8ff669d0f7e/python/perf-kernels/softmax.py """ import argparse