diff --git a/cunumeric/numba_utils.py b/cunumeric/numba_utils.py index 12d25c6d7..4aa46cfab 100644 --- a/cunumeric/numba_utils.py +++ b/cunumeric/numba_utils.py @@ -211,7 +211,7 @@ def compile_ptx_soa( # values as SoA and some simplifications to keep it short if not device: raise NotImplementedError( - "Only device functions can be compiled for " "the SoA ABI" + "Only device functions can be compiled for the SoA ABI" ) nvvm_options: Dict[str, Union[int, str, None]] = { diff --git a/typings/llvmlite/__init__.pyi b/typings/llvmlite/__init__.pyi index ccdc2e65e..711280d9e 100644 --- a/typings/llvmlite/__init__.pyi +++ b/typings/llvmlite/__init__.pyi @@ -1 +1,15 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + from llvmlite import ir diff --git a/typings/llvmlite/ir/__init__.pyi b/typings/llvmlite/ir/__init__.pyi index 04641b6ad..048ddc711 100644 --- a/typings/llvmlite/ir/__init__.pyi +++ b/typings/llvmlite/ir/__init__.pyi @@ -1,3 +1,17 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + from llvmlite.ir.builder import * from llvmlite.ir.module import * from llvmlite.ir.types import * diff --git a/typings/llvmlite/ir/_utils.pyi b/typings/llvmlite/ir/_utils.pyi index 25ff9a715..d02b145ad 100644 --- a/typings/llvmlite/ir/_utils.pyi +++ b/typings/llvmlite/ir/_utils.pyi @@ -1,3 +1,17 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + class _HasMetadata: ... class _StrCaching: ... class _StringReferenceCaching: ... diff --git a/typings/llvmlite/ir/builder.pyi b/typings/llvmlite/ir/builder.pyi index 0e93a33db..581f1d390 100644 --- a/typings/llvmlite/ir/builder.pyi +++ b/typings/llvmlite/ir/builder.pyi @@ -1,3 +1,17 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + from typing import Iterable, Optional, Union from llvmlite.ir.instructions import Instruction, Ret diff --git a/typings/llvmlite/ir/instructions.pyi b/typings/llvmlite/ir/instructions.pyi index 2430503d0..75f1c2872 100644 --- a/typings/llvmlite/ir/instructions.pyi +++ b/typings/llvmlite/ir/instructions.pyi @@ -1,3 +1,17 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + from llvmlite.ir._utils import _HasMetadata from llvmlite.ir.values import NamedValue diff --git a/typings/llvmlite/ir/module.pyi b/typings/llvmlite/ir/module.pyi index 584de21b4..e9d24b059 100644 --- a/typings/llvmlite/ir/module.pyi +++ b/typings/llvmlite/ir/module.pyi @@ -1 +1,15 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + class Module: ... diff --git a/typings/llvmlite/ir/types.pyi b/typings/llvmlite/ir/types.pyi index 793175d89..40d78c0b4 100644 --- a/typings/llvmlite/ir/types.pyi +++ b/typings/llvmlite/ir/types.pyi @@ -1,3 +1,17 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + from typing import Sequence from llvmlite.ir._utils import _StrCaching diff --git a/typings/llvmlite/ir/values.pyi b/typings/llvmlite/ir/values.pyi index 4ba7a4789..6ea7db477 100644 --- a/typings/llvmlite/ir/values.pyi +++ b/typings/llvmlite/ir/values.pyi @@ -1,3 +1,17 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + from typing import Tuple from llvmlite.ir._utils import ( diff --git a/typings/numba/__init__.pyi b/typings/numba/__init__.pyi index c9cd61c5c..33afd9e7a 100644 --- a/typings/numba/__init__.pyi +++ b/typings/numba/__init__.pyi @@ -1,3 +1,17 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + from typing import Any, Callable import numba.cuda # import compile_ptx diff --git a/typings/numba/core/__init__.pyi b/typings/numba/core/__init__.pyi index e69de29bb..7cc93af29 100644 --- a/typings/numba/core/__init__.pyi +++ b/typings/numba/core/__init__.pyi @@ -0,0 +1,13 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. diff --git a/typings/numba/core/base.pyi b/typings/numba/core/base.pyi index 1a5f4cece..fdc9e0874 100644 --- a/typings/numba/core/base.pyi +++ b/typings/numba/core/base.pyi @@ -1 +1,26 @@ -class BaseContext: ... +# Copyright 2024 NVIDIA Corporation +# +# 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. + +from typing import Sequence + +from llvmlite import ir +from numba.core.callconv import BaseCallConv +from numba.core.datamodel import ArgPacker +from numba.core.types import Type + +class BaseContext: + call_conv: BaseCallConv + + def create_module(self, name: str) -> ir.Module: ... + def get_arg_packer(self, fe_args: Sequence[Type]) -> ArgPacker: ... diff --git a/typings/numba/core/callconv.pyi b/typings/numba/core/callconv.pyi index bc4b07134..01d410261 100644 --- a/typings/numba/core/callconv.pyi +++ b/typings/numba/core/callconv.pyi @@ -1,3 +1,17 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + from typing import Iterable, Optional, Tuple from llvmlite.ir.builder import IRBuilder diff --git a/typings/numba/core/ccallback/__init__.pyi b/typings/numba/core/ccallback/__init__.pyi index 81b5030b9..f9b9c57e8 100644 --- a/typings/numba/core/ccallback/__init__.pyi +++ b/typings/numba/core/ccallback/__init__.pyi @@ -1,3 +1,17 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + from typing import Any class CFunc(object): diff --git a/typings/numba/core/codegen.pyi b/typings/numba/core/codegen.pyi index a4288cce7..dad46d2ff 100644 --- a/typings/numba/core/codegen.pyi +++ b/typings/numba/core/codegen.pyi @@ -1,4 +1,30 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + +from typing import Any + +from llvmlite import ir + class CodeLibrary: codegen: "Codegen" + name: str + + def add_linking_library(self, library: CodeLibrary) -> None: ... + def add_ir_module(self, module: ir.Module) -> None: ... + def finalize(self) -> None: ... + +class Codegen: + name: str -class Codegen: ... + def create_library(self, name: str, **kwargs: Any) -> CodeLibrary: ... diff --git a/typings/numba/core/compiler.pyi b/typings/numba/core/compiler.pyi index 0097ad9fa..673488778 100644 --- a/typings/numba/core/compiler.pyi +++ b/typings/numba/core/compiler.pyi @@ -1 +1,24 @@ -class CompileResult: ... +# Copyright 2024 NVIDIA Corporation +# +# 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. + +from numba.core.base import BaseContext +from numba.core.codegen import CodeLibrary +from numba.core.funcdesc import FunctionDescriptor +from numba.core.typing.templates import Signature + +class CompileResult: + target_context: BaseContext + library: CodeLibrary + fndesc: FunctionDescriptor + signature: Signature diff --git a/typings/numba/core/compiler_lock.pyi b/typings/numba/core/compiler_lock.pyi index 322d4021d..24616c2e1 100644 --- a/typings/numba/core/compiler_lock.pyi +++ b/typings/numba/core/compiler_lock.pyi @@ -1,3 +1,17 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + from typing import Any, Callable class _CompilerLock: diff --git a/typings/numba/core/datamodel.pyi b/typings/numba/core/datamodel.pyi index 3122d80f0..40f38f97f 100644 --- a/typings/numba/core/datamodel.pyi +++ b/typings/numba/core/datamodel.pyi @@ -1,6 +1,27 @@ -from typing import Sequence +# Copyright 2024 NVIDIA Corporation +# +# 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. +from typing import Sequence, Tuple + +from llvmlite.ir import Argument +from llvmlite.ir.builder import IRBuilder from llvmlite.ir.types import Type +from llvmlite.ir.values import Value class ArgPacker: argument_types: Sequence[Type] + + def as_arguments( + self, builder: IRBuilder, values: Tuple[Argument, ...] + ) -> Tuple[Value]: ... diff --git a/typings/numba/core/funcdesc.pyi b/typings/numba/core/funcdesc.pyi index 0e19a1ef3..fe83b3d26 100644 --- a/typings/numba/core/funcdesc.pyi +++ b/typings/numba/core/funcdesc.pyi @@ -1 +1,22 @@ -class FunctionDescriptor: ... +# Copyright 2024 NVIDIA Corporation +# +# 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. + +from typing import Optional, Tuple + +from numba.core.types import Type + +class FunctionDescriptor: + argtypes: Tuple[Type] + restype: Type + llvm_func_name: str diff --git a/typings/numba/core/sigutils.pyi b/typings/numba/core/sigutils.pyi index 106c5ca50..2c122b5a7 100644 --- a/typings/numba/core/sigutils.pyi +++ b/typings/numba/core/sigutils.pyi @@ -1,3 +1,17 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + from typing import Tuple, Union from numba.core.types import Type diff --git a/typings/numba/core/types/__init__.pyi b/typings/numba/core/types/__init__.pyi index 21e2b5e00..9b5cbdfdc 100644 --- a/typings/numba/core/types/__init__.pyi +++ b/typings/numba/core/types/__init__.pyi @@ -1,3 +1,17 @@ +# Copyright 2024 NVIDIA Corporation +# +# 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. + from typing import Tuple class Opaque: ... diff --git a/typings/numba/core/typing/templates.pyi b/typings/numba/core/typing/templates.pyi index ae8c06482..3eac0629a 100644 --- a/typings/numba/core/typing/templates.pyi +++ b/typings/numba/core/typing/templates.pyi @@ -1 +1,18 @@ -class Signature: ... +# Copyright 2024 NVIDIA Corporation +# +# 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. + +from numba.core.types import Type + +class Signature: + return_type: Type