From a56220089160fb0c178721c9bd96318a8ff366e7 Mon Sep 17 00:00:00 2001 From: Bryan Van de Ven Date: Thu, 26 Oct 2023 16:43:35 -0700 Subject: [PATCH 1/7] Create bug_report.yml (#877) --- .github/ISSUE_TEMPLATE/bug_report.yml | 97 +++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..34a08c5c7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,97 @@ +name: Bug report +description: Submit a bug report +title: "[BUG] " +labels: TRIAGE +body: + - type: markdown + attributes: + value: "# Bug report" + - type: markdown + attributes: + value: Thank you for reporting a bug and helping us improve Legate! + - type: markdown + attributes: + value: > + Please fill out all of the required information. + - type: markdown + attributes: + value: | + --- + ## Environment information + - type: textarea + id: legate_issue + attributes: + label: Software versions + description: >- + Run `legate-issue` and paste the output here. + placeholder: | + Python : 3.10.11 | packaged by conda-forge | (main, May 10 2023, 18:58:44) [GCC 11.3.0] + Platform : Linux-5.14.0-1042-oem-x86_64-with-glibc2.31 + Legion : v23.11.00.dev-16-g2499f878 + Legate : 23.11.00.dev+17.gb7b50313 + Cunumeric : (ImportError: cannot import name 'LogicalArray' from 'legate.core') + Numpy : 1.24.4 + Scipy : 1.10.1 + Numba : (not installed) + CTK package : cuda-version-11.8-h70ddcb2_2 (conda-forge) + GPU Driver : 515.65.01 + GPU Devices : + GPU 0: Quadro RTX 8000 + GPU 1: Quadro RTX 8000 + validations: + required: true + - type: input + id: jupyter + attributes: + label: Jupyter notebook / Jupyter Lab version + description: >- + Please supply if the issue you are reporting is related to Jupyter + notebook or Jupyter Lab. + validations: + required: false + - type: markdown + attributes: + value: | + ## Issue details + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: What did you expect to happen? + validations: + required: true + - type: textarea + id: observed-behavior + attributes: + label: Observed behavior + description: What did actually happen? + validations: + required: true + - type: markdown + attributes: + value: | + ## Directions to reproduce + - type: textarea + id: example + attributes: + label: Example code or instructions + description: > + Please provide detailed instructions to reproduce the issue. Ideally this includes a + [Complete, minimal, self-contained example code](https://stackoverflow.com/help/minimal-reproducible-example) + given here or as a link to code in another repository. + render: Python + validations: + required: true + - type: markdown + attributes: + value: | + ## Additional information + - type: textarea + id: traceback-console + attributes: + label: Stack traceback or browser console output + description: > + Add any error messages or logs that might be helpful in reproducing and + identifying the bug, for example a Python stack traceback. + validations: + required: false From a4b5430ebb2c52e3f8da8f27534bc0db8826b804 Mon Sep 17 00:00:00 2001 From: Manolis Papadakis Date: Tue, 31 Oct 2023 21:42:57 -0700 Subject: [PATCH 2/7] Remove extraneous PYTHONPATH entry (#878) --- legate/driver/launcher.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/legate/driver/launcher.py b/legate/driver/launcher.py index 61921363b..ff821658e 100644 --- a/legate/driver/launcher.py +++ b/legate/driver/launcher.py @@ -15,7 +15,6 @@ from __future__ import annotations import os -from pathlib import Path from typing import TYPE_CHECKING from .. import install_info @@ -174,9 +173,6 @@ def _compute_env(self) -> tuple[EnvDict, set[str]]: str(system.legion_paths.legion_jupyter_module) ) - # Make sure the base directory for this file is in the python path - extra_python_paths.append(str(Path(__file__).parents[1])) - env["PYTHONPATH"] = os.pathsep.join(extra_python_paths) # If using NCCL prefer parallel launch mode over cooperative groups, From 8f6d882fea2d1bc6a4b06d7f7aef5af157f931e2 Mon Sep 17 00:00:00 2001 From: Bryan Van de Ven Date: Mon, 6 Nov 2023 12:21:32 -0800 Subject: [PATCH 3/7] control ucx presence in install_info more carefully (#882) --- tests/unit/legate/driver/test_command.py | 35 +++++++++++++++++++----- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/tests/unit/legate/driver/test_command.py b/tests/unit/legate/driver/test_command.py index 57aedc4fe..8a215eefb 100644 --- a/tests/unit/legate/driver/test_command.py +++ b/tests/unit/legate/driver/test_command.py @@ -1046,10 +1046,13 @@ def test_default_single_rank(self, genobjs: GenObjs) -> None: assert result == () - def test_utility_1_single_rank(self, genobjs: GenObjs) -> None: + def test_utility_1_single_rank_no_ucx(self, genobjs: GenObjs) -> None: config, system, launcher = genobjs(["--utility", "1"]) + networks_orig = list(install_info.networks) + install_info.networks = [x for x in networks_orig if x != "ucx"] result = m.cmd_bgwork(config, system, launcher) + install_info.networks[:] = networks_orig[:] assert result == () @@ -1064,12 +1067,15 @@ def test_utility_1_single_rank_and_ucx(self, genobjs: GenObjs) -> None: assert result == () @pytest.mark.parametrize("value", ("2", "3", "10")) - def test_utiltity_n_single_rank( + def test_utiltity_n_single_rank_no_ucx( self, genobjs: GenObjs, value: str ) -> None: config, system, launcher = genobjs(["--utility", value]) + networks_orig = list(install_info.networks) + install_info.networks = [x for x in networks_orig if x != "ucx"] result = m.cmd_bgwork(config, system, launcher) + install_info.networks[:] = networks_orig[:] assert result == () @@ -1088,14 +1094,17 @@ def test_utiltity_n_single_rank_and_ucx( @pytest.mark.parametrize("rank_var", RANK_ENV_VARS) @pytest.mark.parametrize("rank", ("0", "1", "2")) - def test_default_multi_rank( + def test_default_multi_rank_no_ucx( self, genobjs: GenObjs, rank: str, rank_var: dict[str, str] ) -> None: config, system, launcher = genobjs( [], multi_rank=(2, 2), rank_env={rank_var: rank} ) + networks_orig = list(install_info.networks) + install_info.networks = [x for x in networks_orig if x != "ucx"] result = m.cmd_bgwork(config, system, launcher) + install_info.networks[:] = networks_orig[:] assert result == ("-ll:bgwork", "2") @@ -1117,14 +1126,17 @@ def test_default_multi_rank_and_ucx( @pytest.mark.parametrize("rank_var", RANK_ENV_VARS) @pytest.mark.parametrize("rank", ("0", "1", "2")) - def test_utility_1_multi_rank_no_launcher( + def test_utility_1_multi_rank_no_launcher_no_ucx( self, genobjs: GenObjs, rank: str, rank_var: dict[str, str] ) -> None: config, system, launcher = genobjs( ["--utility", "1"], multi_rank=(2, 2), rank_env={rank_var: rank} ) + networks_orig = list(install_info.networks) + install_info.networks = [x for x in networks_orig if x != "ucx"] result = m.cmd_bgwork(config, system, launcher) + install_info.networks[:] = networks_orig[:] assert result == ("-ll:bgwork", "2") @@ -1145,14 +1157,17 @@ def test_utility_1_multi_rank_no_launcher_and_ucx( assert result == ("-ll:bgwork", "2", "-ll:bgworkpin", "1") @pytest.mark.parametrize("launch", ("mpirun", "jsrun", "srun")) - def test_utility_1_multi_rank_with_launcher( + def test_utility_1_multi_rank_with_launcher_no_ucx( self, genobjs: GenObjs, launch: str ) -> None: config, system, launcher = genobjs( ["--utility", "1", "--launcher", launch], multi_rank=(2, 2) ) + networks_orig = list(install_info.networks) + install_info.networks = [x for x in networks_orig if x != "ucx"] result = m.cmd_bgwork(config, system, launcher) + install_info.networks[:] = networks_orig[:] assert result == ("-ll:bgwork", "2") @@ -1174,14 +1189,17 @@ def test_utility_1_multi_rank_with_launcher_and_ucx( @pytest.mark.parametrize("rank_var", RANK_ENV_VARS) @pytest.mark.parametrize("rank", ("0", "1", "2")) @pytest.mark.parametrize("value", ("2", "3", "10")) - def test_utility_n_multi_rank_no_launcher( + def test_utility_n_multi_rank_no_launcher_no_ucx( self, genobjs: GenObjs, value: str, rank: str, rank_var: dict[str, str] ) -> None: config, system, launcher = genobjs( ["--utility", value], multi_rank=(2, 2), rank_env={rank_var: rank} ) + networks_orig = list(install_info.networks) + install_info.networks = [x for x in networks_orig if x != "ucx"] result = m.cmd_bgwork(config, system, launcher) + install_info.networks[:] = networks_orig[:] assert result == ("-ll:bgwork", value) @@ -1204,14 +1222,17 @@ def test_utility_n_multi_rank_no_launcher_and_ucx( @pytest.mark.parametrize("launch", ("mpirun", "jsrun", "srun")) @pytest.mark.parametrize("value", ("2", "3", "10")) - def test_utility_n_multi_rank_with_launcher( + def test_utility_n_multi_rank_with_launcher_no_ucx( self, genobjs: GenObjs, value: str, launch: str ) -> None: config, system, launcher = genobjs( ["--utility", value, "--launcher", launch], multi_rank=(2, 2) ) + networks_orig = list(install_info.networks) + install_info.networks = [x for x in networks_orig if x != "ucx"] result = m.cmd_bgwork(config, system, launcher) + install_info.networks[:] = networks_orig[:] assert result == ("-ll:bgwork", value) From 984817ec2785ed8563dd6485ac43539707814cd5 Mon Sep 17 00:00:00 2001 From: Manolis Papadakis Date: Mon, 6 Nov 2023 15:23:06 -0800 Subject: [PATCH 4/7] Typos (#880) --- scripts/util/build-caching.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/util/build-caching.sh b/scripts/util/build-caching.sh index 70de985d3..9fb4c1b4a 100755 --- a/scripts/util/build-caching.sh +++ b/scripts/util/build-caching.sh @@ -7,9 +7,9 @@ if [[ -n "$(which sccache)" ]]; then CMAKE_CUDA_COMPILER_LAUNCHER="${CMAKE_CUDA_COMPILER_LAUNCHER:-$(which sccache)}"; elif [[ -n "$(which ccache)" ]]; then # Use ccache if installed - CMAKE_C_COMPILER_LAUNCHER="${CMAKE_C_COMPILER_LAUNCHER:-$(which cache)}"; - CMAKE_CXX_COMPILER_LAUNCHER="${CMAKE_CXX_COMPILER_LAUNCHER:-$(which cache)}"; - CMAKE_CUDA_COMPILER_LAUNCHER="${CMAKE_CUDA_COMPILER_LAUNCHER:-$(which cache)}"; + CMAKE_C_COMPILER_LAUNCHER="${CMAKE_C_COMPILER_LAUNCHER:-$(which ccache)}"; + CMAKE_CXX_COMPILER_LAUNCHER="${CMAKE_CXX_COMPILER_LAUNCHER:-$(which ccache)}"; + CMAKE_CUDA_COMPILER_LAUNCHER="${CMAKE_CUDA_COMPILER_LAUNCHER:-$(which ccache)}"; fi export CMAKE_C_COMPILER_LAUNCHER="$CMAKE_C_COMPILER_LAUNCHER" From 6fa0acc9dcfa89be2702f1de6c045bc262f752b1 Mon Sep 17 00:00:00 2001 From: Manolis Papadakis Date: Mon, 6 Nov 2023 15:23:29 -0800 Subject: [PATCH 5/7] Suggest using mamba over conda (#881) --- BUILD.md | 4 ++-- README.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BUILD.md b/BUILD.md index 219406106..f1e15f793 100644 --- a/BUILD.md +++ b/BUILD.md @@ -45,13 +45,13 @@ Once you have this environment file, you can install the required packages by creating a new conda environment: ```shell -conda env create -n legate -f .yaml +mamba env create -n legate -f .yaml ``` or by updating an existing environment: ```shell -conda env update -f .yaml +mamba env update -f .yaml ``` ## Building through install.py diff --git a/README.md b/README.md index e7bdd615c..cafac8a35 100644 --- a/README.md +++ b/README.md @@ -218,15 +218,15 @@ as though they are running on a single processor. Legate Core is available [on conda](https://anaconda.org/legate/legate-core): ``` -conda install -c nvidia -c conda-forge -c legate legate-core +mamba install -c nvidia -c conda-forge -c legate legate-core ``` Only linux-64 packages are available at the moment. The default package contains GPU support, and is compatible with CUDA >= 12.0 (CUDA driver version >= r520), and Volta or later GPU architectures. There are -also CPU-only packages available, and will be automatically selected by `conda` -when installing on a machine without GPUs. +also CPU-only packages available, and will be automatically selected when +installing on a machine without GPUs. See [BUILD.md](BUILD.md) for instructions on building Legate Core from source. From 74244e72792c6be690c7984a7a6aea4cf45f948a Mon Sep 17 00:00:00 2001 From: Jacob Faibussowitsch Date: Wed, 15 Nov 2023 12:23:28 -0500 Subject: [PATCH 6/7] Fix OSX mypy errors (#884) --- legate/tester/stages/__init__.py | 3 +-- legate/tester/stages/_osx/gpu.py | 9 ++++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/legate/tester/stages/__init__.py b/legate/tester/stages/__init__.py index fa8f916d5..3bdef281a 100644 --- a/legate/tester/stages/__init__.py +++ b/legate/tester/stages/__init__.py @@ -19,7 +19,6 @@ from __future__ import annotations import sys -from typing import Dict, Type from .. import FeatureType from .test_stage import TestStage @@ -33,7 +32,7 @@ raise RuntimeError(f"unsupported platform: {sys.platform}") #: All the available test stages that can be selected -STAGES: Dict[FeatureType, Type[TestStage]] = { +STAGES: dict[FeatureType, type[TestStage]] = { "cpus": CPU, "cuda": GPU, "openmp": OMP, diff --git a/legate/tester/stages/_osx/gpu.py b/legate/tester/stages/_osx/gpu.py index 789a15aa3..ac8f50bd3 100644 --- a/legate/tester/stages/_osx/gpu.py +++ b/legate/tester/stages/_osx/gpu.py @@ -18,13 +18,14 @@ from typing import TYPE_CHECKING from ..test_stage import TestStage -from ..util import UNPIN_ENV, Shard +from ..util import UNPIN_ENV if TYPE_CHECKING: from ....util.types import ArgList, EnvDict from ... import FeatureType from ...config import Config from ...test_system import TestSystem + from ..util import Shard, StageSpec class GPU(TestStage): @@ -52,3 +53,9 @@ def env(self, config: Config, system: TestSystem) -> EnvDict: def delay(self, shard: Shard, config: Config, system: TestSystem) -> None: time.sleep(config.gpu_delay / 1000) + + def shard_args(self, shard: Shard, config: Config) -> ArgList: + raise NotImplementedError() + + def compute_spec(self, config: Config, system: TestSystem) -> StageSpec: + raise NotImplementedError() From 434966aebfb720ced0da39448aa1ba3ca303489b Mon Sep 17 00:00:00 2001 From: Irina Demeshko Date: Wed, 15 Nov 2023 20:14:34 -0800 Subject: [PATCH 7/7] adding a workaround for NumPy's conversion from unit64 to float (#885) * adding a workaround for NumPy's expected behavior when adding an integer to np.uint64, resulting in float64 * Update legate/core/store.py Co-authored-by: Wonchan Lee --------- Co-authored-by: Wonchan Lee --- legate/core/store.py | 1 + 1 file changed, 1 insertion(+) diff --git a/legate/core/store.py b/legate/core/store.py index c870f513f..4f6c63307 100644 --- a/legate/core/store.py +++ b/legate/core/store.py @@ -1233,6 +1233,7 @@ def project(self, dim: int, index: int) -> Store: If ``dim`` is not a valid dimension name or ``index`` is out of bounds """ + index = int(index) dim = dim + self.ndim if dim < 0 else dim if dim < 0 or dim >= self.ndim: raise ValueError(