iree-base-runtime 2.9.0__cp313-cp313-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. iree/_runtime/__init__.py +0 -0
  2. iree/_runtime/libs.py +32 -0
  3. iree/_runtime/scripts/iree_benchmark_executable/__main__.py +21 -0
  4. iree/_runtime/scripts/iree_benchmark_module/__main__.py +21 -0
  5. iree/_runtime/scripts/iree_c_embed_data/__main__.py +21 -0
  6. iree/_runtime/scripts/iree_convert_parameters/__main__.py +23 -0
  7. iree/_runtime/scripts/iree_cpuinfo/__main__.py +23 -0
  8. iree/_runtime/scripts/iree_create_parameters/__main__.py +23 -0
  9. iree/_runtime/scripts/iree_dump_module/__main__.py +23 -0
  10. iree/_runtime/scripts/iree_dump_parameters/__main__.py +23 -0
  11. iree/_runtime/scripts/iree_flatcc_cli/__main__.py +21 -0
  12. iree/_runtime/scripts/iree_run_module/__main__.py +21 -0
  13. iree/_runtime/scripts/iree_tracy_capture/__main__.py +27 -0
  14. iree/_runtime_libs/__init__.py +0 -0
  15. iree/_runtime_libs/_runtime.cp313-win_amd64.pyd +0 -0
  16. iree/_runtime_libs/iree-benchmark-executable.exe +0 -0
  17. iree/_runtime_libs/iree-benchmark-module.exe +0 -0
  18. iree/_runtime_libs/iree-c-embed-data.exe +0 -0
  19. iree/_runtime_libs/iree-convert-parameters.exe +0 -0
  20. iree/_runtime_libs/iree-cpuinfo.exe +0 -0
  21. iree/_runtime_libs/iree-create-parameters.exe +0 -0
  22. iree/_runtime_libs/iree-dump-module.exe +0 -0
  23. iree/_runtime_libs/iree-dump-parameters.exe +0 -0
  24. iree/_runtime_libs/iree-flatcc-cli.exe +0 -0
  25. iree/_runtime_libs/iree-run-module.exe +0 -0
  26. iree/_runtime_libs/version.py +4 -0
  27. iree/_runtime_libs_tracy/__init__.py +0 -0
  28. iree/_runtime_libs_tracy/_runtime.cp313-win_amd64.pyd +0 -0
  29. iree/_runtime_libs_tracy/iree-benchmark-executable.exe +0 -0
  30. iree/_runtime_libs_tracy/iree-benchmark-module.exe +0 -0
  31. iree/_runtime_libs_tracy/iree-c-embed-data.exe +0 -0
  32. iree/_runtime_libs_tracy/iree-convert-parameters.exe +0 -0
  33. iree/_runtime_libs_tracy/iree-cpuinfo.exe +0 -0
  34. iree/_runtime_libs_tracy/iree-create-parameters.exe +0 -0
  35. iree/_runtime_libs_tracy/iree-dump-module.exe +0 -0
  36. iree/_runtime_libs_tracy/iree-dump-parameters.exe +0 -0
  37. iree/_runtime_libs_tracy/iree-flatcc-cli.exe +0 -0
  38. iree/_runtime_libs_tracy/iree-run-module.exe +0 -0
  39. iree/_runtime_libs_tracy/version.py +4 -0
  40. iree/runtime/__init__.py +71 -0
  41. iree/runtime/_binding.py +21 -0
  42. iree/runtime/_binding.pyi +550 -0
  43. iree/runtime/_package_test.py +45 -0
  44. iree/runtime/array_interop.py +314 -0
  45. iree/runtime/benchmark.py +146 -0
  46. iree/runtime/flags.py +43 -0
  47. iree/runtime/function.py +388 -0
  48. iree/runtime/io.py +66 -0
  49. iree/runtime/system_api.py +317 -0
  50. iree/runtime/system_setup.py +105 -0
  51. iree/runtime/version.py +12 -0
  52. iree_base_runtime-2.9.0.dist-info/METADATA +23 -0
  53. iree_base_runtime-2.9.0.dist-info/RECORD +56 -0
  54. iree_base_runtime-2.9.0.dist-info/WHEEL +5 -0
  55. iree_base_runtime-2.9.0.dist-info/entry_points.txt +11 -0
  56. iree_base_runtime-2.9.0.dist-info/top_level.txt +1 -0
File without changes
iree/_runtime/libs.py ADDED
@@ -0,0 +1,32 @@
1
+ # Copyright 2023 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ """Trampoline to the right iree._runtime_libs*._runtime module."""
7
+
8
+ import os
9
+ import sys
10
+ import warnings
11
+
12
+ variant = os.getenv("IREE_PY_RUNTIME", "default")
13
+ if variant == "tracy":
14
+ try:
15
+ import iree._runtime_libs_tracy as libs
16
+ except ModuleNotFoundError as e:
17
+ raise ModuleNotFoundError(
18
+ "IREE Tracy runtime requested via IREE_PY_RUNTIME but it is not "
19
+ "enabled in this build"
20
+ ) from e
21
+ print("-- Using Tracy runtime (IREE_PY_RUNTIME=tracy)", file=sys.stderr)
22
+ else:
23
+ if variant != "default":
24
+ warnings.warn(
25
+ f"Unknown value for IREE_PY_RUNTIME env var ({variant}): " f"Using default"
26
+ )
27
+ variant = "default"
28
+ import iree._runtime_libs as libs
29
+
30
+ libs.name = variant
31
+ libs.library_path = libs.__path__[0]
32
+ sys.modules[__name__] = libs
@@ -0,0 +1,21 @@
1
+ # Copyright 2024 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+
7
+ import os
8
+ import subprocess
9
+ import sys
10
+ from ... import libs
11
+
12
+
13
+ def main(args=None):
14
+ if args is None:
15
+ args = sys.argv[1:]
16
+ exe = os.path.join(libs.library_path, "iree-benchmark-executable")
17
+ return subprocess.call(args=[exe] + args)
18
+
19
+
20
+ if __name__ == "__main__":
21
+ sys.exit(main())
@@ -0,0 +1,21 @@
1
+ # Copyright 2022 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+
7
+ import os
8
+ import subprocess
9
+ import sys
10
+ from ... import libs
11
+
12
+
13
+ def main(args=None):
14
+ if args is None:
15
+ args = sys.argv[1:]
16
+ exe = os.path.join(libs.library_path, "iree-benchmark-module")
17
+ return subprocess.call(args=[exe] + args)
18
+
19
+
20
+ if __name__ == "__main__":
21
+ sys.exit(main())
@@ -0,0 +1,21 @@
1
+ # Copyright 2024 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+
7
+ import os
8
+ import subprocess
9
+ import sys
10
+ from ... import libs
11
+
12
+
13
+ def main(args=None):
14
+ if args is None:
15
+ args = sys.argv[1:]
16
+ exe = os.path.join(libs.library_path, "iree-c-embed-data")
17
+ return subprocess.call(args=[exe] + args)
18
+
19
+
20
+ if __name__ == "__main__":
21
+ sys.exit(main())
@@ -0,0 +1,23 @@
1
+ # Copyright 2023 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+
7
+ import os
8
+ import subprocess
9
+ import sys
10
+
11
+ # Note that iree-convert-parameters is only in the default libs.
12
+ from iree import _runtime_libs
13
+
14
+
15
+ def main(args=None):
16
+ if args is None:
17
+ args = sys.argv[1:]
18
+ exe = os.path.join(_runtime_libs.__path__[0], "iree-convert-parameters")
19
+ return subprocess.call(args=[exe] + args)
20
+
21
+
22
+ if __name__ == "__main__":
23
+ sys.exit(main())
@@ -0,0 +1,23 @@
1
+ # Copyright 2023 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+
7
+ import os
8
+ import subprocess
9
+ import sys
10
+
11
+ # Note that cpuinfo is only in the default runtime.
12
+ from iree import _runtime_libs
13
+
14
+
15
+ def main(args=None):
16
+ if args is None:
17
+ args = sys.argv[1:]
18
+ exe = os.path.join(_runtime_libs.__path__[0], "iree-cpuinfo")
19
+ return subprocess.call(args=[exe] + args)
20
+
21
+
22
+ if __name__ == "__main__":
23
+ sys.exit(main())
@@ -0,0 +1,23 @@
1
+ # Copyright 2023 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+
7
+ import os
8
+ import subprocess
9
+ import sys
10
+
11
+ # Note that iree-create-parameters is only in the default libs.
12
+ from iree import _runtime_libs
13
+
14
+
15
+ def main(args=None):
16
+ if args is None:
17
+ args = sys.argv[1:]
18
+ exe = os.path.join(_runtime_libs.__path__[0], "iree-create-parameters")
19
+ return subprocess.call(args=[exe] + args)
20
+
21
+
22
+ if __name__ == "__main__":
23
+ sys.exit(main())
@@ -0,0 +1,23 @@
1
+ # Copyright 2023 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+
7
+ import os
8
+ import subprocess
9
+ import sys
10
+
11
+ # Note that dump-module is only in the default libs.
12
+ from iree import _runtime_libs
13
+
14
+
15
+ def main(args=None):
16
+ if args is None:
17
+ args = sys.argv[1:]
18
+ exe = os.path.join(_runtime_libs.__path__[0], "iree-dump-module")
19
+ return subprocess.call(args=[exe] + args)
20
+
21
+
22
+ if __name__ == "__main__":
23
+ sys.exit(main())
@@ -0,0 +1,23 @@
1
+ # Copyright 2023 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+
7
+ import os
8
+ import subprocess
9
+ import sys
10
+
11
+ # Note that dump-module is only in the default libs.
12
+ from iree import _runtime_libs
13
+
14
+
15
+ def main(args=None):
16
+ if args is None:
17
+ args = sys.argv[1:]
18
+ exe = os.path.join(_runtime_libs.__path__[0], "iree-dump-parameters")
19
+ return subprocess.call(args=[exe] + args)
20
+
21
+
22
+ if __name__ == "__main__":
23
+ sys.exit(main())
@@ -0,0 +1,21 @@
1
+ # Copyright 2024 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+
7
+ import os
8
+ import subprocess
9
+ import sys
10
+ from ... import libs
11
+
12
+
13
+ def main(args=None):
14
+ if args is None:
15
+ args = sys.argv[1:]
16
+ exe = os.path.join(libs.library_path, "iree-flatcc-cli")
17
+ return subprocess.call(args=[exe] + args)
18
+
19
+
20
+ if __name__ == "__main__":
21
+ sys.exit(main())
@@ -0,0 +1,21 @@
1
+ # Copyright 2021 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+
7
+ import os
8
+ import subprocess
9
+ import sys
10
+ from ... import libs
11
+
12
+
13
+ def main(args=None):
14
+ if args is None:
15
+ args = sys.argv[1:]
16
+ exe = os.path.join(libs.library_path, "iree-run-module")
17
+ return subprocess.call(args=[exe] + args)
18
+
19
+
20
+ if __name__ == "__main__":
21
+ sys.exit(main())
@@ -0,0 +1,27 @@
1
+ # Copyright 2021 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+
7
+ import os
8
+ import subprocess
9
+ import sys
10
+
11
+
12
+ def main(args=None):
13
+ try:
14
+ from iree import _runtime_libs_tracy
15
+ except ModuleNotFoundError as e:
16
+ raise ModuleNotFoundError(
17
+ "This command requires that a tracy runtime is available "
18
+ "but it was not built for this platform."
19
+ ) from e
20
+ if args is None:
21
+ args = sys.argv[1:]
22
+ exe = os.path.join(_runtime_libs_tracy.__path__[0], "iree-tracy-capture")
23
+ return subprocess.call(args=[exe] + args)
24
+
25
+
26
+ if __name__ == "__main__":
27
+ sys.exit(main())
File without changes
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,4 @@
1
+ # Auto-generated version info.
2
+ PACKAGE_SUFFIX = ""
3
+ VERSION = "2.9.0rc20241108"
4
+ REVISIONS = {"IREE": "cf95c943fab43044148e1c47a2839ad765346b7f"}
File without changes
@@ -0,0 +1,4 @@
1
+ # Auto-generated version info.
2
+ PACKAGE_SUFFIX = ""
3
+ VERSION = "2.9.0rc20241108"
4
+ REVISIONS = {"IREE": "cf95c943fab43044148e1c47a2839ad765346b7f"}
@@ -0,0 +1,71 @@
1
+ """IREE runtime Python bindings."""
2
+
3
+ # Copyright 2019 The IREE Authors
4
+ #
5
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
6
+ # See https://llvm.org/LICENSE.txt for license information.
7
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8
+
9
+ # pylint: disable=g-multiple-import
10
+ # pylint: disable=g-bad-import-order
11
+ # pylint: disable=wildcard-import
12
+
13
+ from . import _binding
14
+
15
+ # Pull some of the native symbols into the public API.
16
+ # Io imports
17
+ from ._binding import (
18
+ FileHandle,
19
+ ParameterIndex,
20
+ ParameterIndexEntry,
21
+ ParameterProvider,
22
+ create_io_parameters_module,
23
+ )
24
+
25
+ # Hal imports
26
+ from ._binding import (
27
+ BufferCompatibility,
28
+ BufferUsage,
29
+ HalAllocator,
30
+ HalBuffer,
31
+ HalBufferView,
32
+ HalCommandBuffer,
33
+ HalDevice,
34
+ HalDeviceLoopBridge,
35
+ HalDriver,
36
+ HalElementType,
37
+ HalFence,
38
+ HalSemaphore,
39
+ MappedMemory,
40
+ MemoryAccess,
41
+ MemoryType,
42
+ PyModuleInterface,
43
+ Shape,
44
+ create_hal_module,
45
+ )
46
+
47
+ # Vm imports
48
+ from ._binding import (
49
+ Linkage,
50
+ VmBuffer,
51
+ VmVariantList,
52
+ VmFunction,
53
+ VmInstance,
54
+ VmContext,
55
+ VmModule,
56
+ VmRef,
57
+ )
58
+
59
+ from .array_interop import *
60
+ from .benchmark import *
61
+ from .system_api import *
62
+ from .system_setup import (
63
+ get_device,
64
+ get_first_device,
65
+ get_driver,
66
+ query_available_drivers,
67
+ )
68
+ from .function import *
69
+ from .io import *
70
+
71
+ from . import flags
@@ -0,0 +1,21 @@
1
+ # Copyright 2022 The IREE Authors
2
+ #
3
+ # Licensed under the Apache License v2.0 with LLVM Exceptions.
4
+ # See https://llvm.org/LICENSE.txt for license information.
5
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ """Imports the native runtime library.
7
+
8
+ All code in the runtime should use runtime imports via this module, which
9
+ locates the actual _runtime module based on environment configuration.
10
+
11
+ TODO: We could rename this to _runtime since it a trampoline for
12
+ the _runtime native extension module we load from elsehwhere.
13
+ """
14
+
15
+ import sys
16
+
17
+ # "_runtime" is the native extension within the _runtime_libs package
18
+ # selected.
19
+ from .._runtime.libs import _runtime
20
+
21
+ sys.modules[__name__] = _runtime