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 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. 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( 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, 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() 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" diff --git a/tests/unit/legate/driver/test_command.py b/tests/unit/legate/driver/test_command.py index f157f67a0..594026f86 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[:] if "ucx" in install_info.networks: assert result == ("-ll:bgwork", "2", "-ll:bgworkpin", "1") @@ -1120,14 +1129,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[:] if "ucx" in install_info.networks: assert result == ("-ll:bgwork", "2", "-ll:bgworkpin", "1") @@ -1151,14 +1163,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[:] if "ucx" in install_info.networks: assert result == ("-ll:bgwork", "2", "-ll:bgworkpin", "1") @@ -1183,14 +1198,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[:] if "ucx" in install_info.networks: assert result == ("-ll:bgwork", value, "-ll:bgworkpin", "1") @@ -1216,14 +1234,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[:] if "ucx" in install_info.networks: assert result == ("-ll:bgwork", value, "-ll:bgworkpin", "1")