From 18e3035fca8148bf96bf94522903e32f5a6c4ba8 Mon Sep 17 00:00:00 2001 From: David Corvoysier Date: Fri, 12 Apr 2024 10:48:26 +0200 Subject: [PATCH] chore: add license headers in cpp files --- quanto/library/ext/cpp/mm.cpp | 14 ++++++++++++++ quanto/library/ext/cpp/mm.h | 14 ++++++++++++++ quanto/library/ext/cpp/pybind_module.cpp | 14 ++++++++++++++ quanto/library/ext/cpp/unpack.cpp | 14 ++++++++++++++ quanto/library/ext/cpp/unpack.h | 14 ++++++++++++++ quanto/library/ext/cuda/pybind_module.cpp | 14 ++++++++++++++ quanto/library/ext/cuda/unpack.cu | 14 ++++++++++++++ quanto/library/ext/cuda/unpack.h | 14 ++++++++++++++ quanto/library/ext/mps/pybind_module.cpp | 14 ++++++++++++++ quanto/library/ext/mps/unpack.h | 14 ++++++++++++++ quanto/library/ext/mps/unpack.mm | 14 ++++++++++++++ 11 files changed, 154 insertions(+) diff --git a/quanto/library/ext/cpp/mm.cpp b/quanto/library/ext/cpp/mm.cpp index 7c178636..f5ae744c 100644 --- a/quanto/library/ext/cpp/mm.cpp +++ b/quanto/library/ext/cpp/mm.cpp @@ -1,3 +1,17 @@ +// Copyright 2024 The HuggingFace Team. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include "mm.h" #include diff --git a/quanto/library/ext/cpp/mm.h b/quanto/library/ext/cpp/mm.h index a88057a3..d2fe894e 100644 --- a/quanto/library/ext/cpp/mm.h +++ b/quanto/library/ext/cpp/mm.h @@ -1,3 +1,17 @@ +// Copyright 2024 The HuggingFace Team. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include torch::Tensor dqmm(torch::Tensor &input, torch::Tensor &other, torch::Tensor& other_scale); diff --git a/quanto/library/ext/cpp/pybind_module.cpp b/quanto/library/ext/cpp/pybind_module.cpp index 1b2a2db8..f8e51a19 100644 --- a/quanto/library/ext/cpp/pybind_module.cpp +++ b/quanto/library/ext/cpp/pybind_module.cpp @@ -1,3 +1,17 @@ +// Copyright 2024 The HuggingFace Team. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include #include "mm.h" #include "unpack.h" diff --git a/quanto/library/ext/cpp/unpack.cpp b/quanto/library/ext/cpp/unpack.cpp index 31ef3b28..f8ef705a 100644 --- a/quanto/library/ext/cpp/unpack.cpp +++ b/quanto/library/ext/cpp/unpack.cpp @@ -1,3 +1,17 @@ +// Copyright 2024 The HuggingFace Team. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include "unpack.h" #include diff --git a/quanto/library/ext/cpp/unpack.h b/quanto/library/ext/cpp/unpack.h index ddabf77a..788024fa 100644 --- a/quanto/library/ext/cpp/unpack.h +++ b/quanto/library/ext/cpp/unpack.h @@ -1,3 +1,17 @@ +// Copyright 2024 The HuggingFace Team. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include torch::Tensor unpack(torch::Tensor &t, int bits); diff --git a/quanto/library/ext/cuda/pybind_module.cpp b/quanto/library/ext/cuda/pybind_module.cpp index 013f2e6f..cca63082 100644 --- a/quanto/library/ext/cuda/pybind_module.cpp +++ b/quanto/library/ext/cuda/pybind_module.cpp @@ -1,3 +1,17 @@ +// Copyright 2024 The HuggingFace Team. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include #include "unpack.h" diff --git a/quanto/library/ext/cuda/unpack.cu b/quanto/library/ext/cuda/unpack.cu index 3512a60b..1309c833 100644 --- a/quanto/library/ext/cuda/unpack.cu +++ b/quanto/library/ext/cuda/unpack.cu @@ -1,3 +1,17 @@ +// Copyright 2024 The HuggingFace Team. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include #include #include diff --git a/quanto/library/ext/cuda/unpack.h b/quanto/library/ext/cuda/unpack.h index ddabf77a..788024fa 100644 --- a/quanto/library/ext/cuda/unpack.h +++ b/quanto/library/ext/cuda/unpack.h @@ -1,3 +1,17 @@ +// Copyright 2024 The HuggingFace Team. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include torch::Tensor unpack(torch::Tensor &t, int bits); diff --git a/quanto/library/ext/mps/pybind_module.cpp b/quanto/library/ext/mps/pybind_module.cpp index ee700e75..0d0baea4 100644 --- a/quanto/library/ext/mps/pybind_module.cpp +++ b/quanto/library/ext/mps/pybind_module.cpp @@ -1,3 +1,17 @@ +// Copyright 2024 The HuggingFace Team. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include #include "unpack.h" diff --git a/quanto/library/ext/mps/unpack.h b/quanto/library/ext/mps/unpack.h index 6685091c..0a3c4505 100644 --- a/quanto/library/ext/mps/unpack.h +++ b/quanto/library/ext/mps/unpack.h @@ -1,3 +1,17 @@ +// Copyright 2024 The HuggingFace Team. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include torch::Tensor unpack(const torch::Tensor &input, int bits); diff --git a/quanto/library/ext/mps/unpack.mm b/quanto/library/ext/mps/unpack.mm index b6a3eecb..29063e05 100644 --- a/quanto/library/ext/mps/unpack.mm +++ b/quanto/library/ext/mps/unpack.mm @@ -1,3 +1,17 @@ +// Copyright 2024 The HuggingFace Team. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include "unpack.h" #include