diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..c85e22c12d78cb2e5a3ef753bc8baf4ee4cb3780 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,76 @@ +name: CI +on: + push: + branches: + - master + pull_request: + paths-ignore: + - 'doc/*.rst' + schedule: + - cron: '17 3 * * 0' + +jobs: + flake8: + name: Flake8 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: "Main Script" + run: | + curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-flake8.sh + . ./prepare-and-run-flake8.sh ./loopy ./test + + pylint: + name: Pylint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: "Main Script" + run: | + sed 's/python=3/python=3.7/' .test-conda-env-py3.yml > .test-conda-env.yml + CONDA_ENVIRONMENT=.test-conda-env.yml + USE_CONDA_BUILD=1 + curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-pylint.sh + . ./prepare-and-run-pylint.sh loopy test/test_*.py + + pytest3: + name: Conda Pytest Py3 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: "Main Script" + run: | + CONDA_ENVIRONMENT=.test-conda-env-py3.yml + curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project-within-miniconda.sh + . ./build-and-test-py-project-within-miniconda.sh + + pytest2: + name: Conda Pytest Py2 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: "Main Script" + run: | + sed 's/python=3/python=2.7/' .test-conda-env-py3.yml > .test-conda-env-py2.yml + cat .test-conda-env-py2.yml + CONDA_ENVIRONMENT=.test-conda-env-py2.yml + curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project-within-miniconda.sh + . ./build-and-test-py-project-within-miniconda.sh + + pytest_twice: + name: Pytest twice (for cache behavior) on Py${{ matrix.python-version }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: "Main Script" + run: | + CONDA_ENVIRONMENT=.test-conda-env-py3.yml + curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project-within-miniconda.sh + . ./build-and-test-py-project-within-miniconda.sh + ${PY_EXE} -m pytest -rw --durations=10 --tb=native --junitxml=pytest.xml -rxs $TESTABLES + +# vim: sw=4 diff --git a/README.rst b/README.rst index fe7eb751a7144d9758df91914b643392de421450..4aa93e0888a0063c6c0af2a2c8916b85018b182e 100644 --- a/README.rst +++ b/README.rst @@ -4,9 +4,9 @@ Loopy: Transformation-Based Generation of High-Performance CPU/GPU Code .. image:: https://gitlab.tiker.net/inducer/loopy/badges/master/pipeline.svg :alt: Gitlab Build Status :target: https://gitlab.tiker.net/inducer/loopy/commits/master -.. image:: https://dev.azure.com/ak-spam/inducer/_apis/build/status/inducer.loopy?branchName=master - :alt: Azure Build Status - :target: https://dev.azure.com/ak-spam/inducer/_build/latest?definitionId=10&branchName=master +.. image:: https://github.com/inducer/loopy/workflows/CI/badge.svg?branch=master + :alt: Github Build Status + :target: https://github.com/inducer/loopy/actions?query=branch%3Amaster+workflow%3ACI .. image:: https://badge.fury.io/py/loo.py.png :alt: Python Package Index Release Page :target: https://pypi.org/project/loo.py/ diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 0dfb2455568b275b40e699683071da3a1cd2f483..0000000000000000000000000000000000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,114 +0,0 @@ -jobs: -- - job: 'Python2' - pool: - vmImage: 'ubuntu-latest' - - steps: - - - script: | - set -e - sed 's/python=3/python=2.7/' .test-conda-env-py3.yml > .test-conda-env-py2.yml - cat .test-conda-env-py2.yml - CONDA_ENVIRONMENT=.test-conda-env-py2.yml - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project-within-miniconda.sh - . ./build-and-test-py-project-within-miniconda.sh - - displayName: 'Pytest Conda' - - - task: PublishTestResults@2 - inputs: - testResultsFormat: 'JUnit' - testResultsFiles: 'test/pytest.xml' - -- - job: 'Python3' - pool: - vmImage: 'ubuntu-latest' - - steps: - - - script: | - set -e - CONDA_ENVIRONMENT=.test-conda-env-py3.yml - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project-within-miniconda.sh - . ./build-and-test-py-project-within-miniconda.sh - - displayName: 'Pytest Conda' - - - - task: PublishTestResults@2 - inputs: - testResultsFormat: 'JUnit' - testResultsFiles: 'test/pytest.xml' - -- - job: 'Python3Twice' - displayName: "Python3 - run tests twice to test cache behavior" - pool: - vmImage: 'ubuntu-latest' - - steps: - - - script: | - set -e - CONDA_ENVIRONMENT=.test-conda-env-py3.yml - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project-within-miniconda.sh - . ./build-and-test-py-project-within-miniconda.sh - ${PY_EXE} -m pytest -rw --durations=10 --tb=native --junitxml=pytest.xml -rxs $TESTABLES - - displayName: 'Pytest Conda' - - - - task: PublishTestResults@2 - inputs: - testResultsFormat: 'JUnit' - testResultsFiles: 'test/pytest.xml' - -- - job: 'Flake8' - pool: - vmImage: 'ubuntu-latest' - strategy: - matrix: - Python37: - python.version: '3.7' - - steps: - - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - - - - script: | - set -e - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-flake8.sh - . ./prepare-and-run-flake8.sh loopy test - - displayName: 'Flake8' - -- - job: 'Pylint' - pool: - vmImage: 'ubuntu-latest' - - steps: - - - script: | - set -e - sed 's/python=3/python=3.7/' .test-conda-env-py3.yml > .test-conda-env.yml - CONDA_ENVIRONMENT=.test-conda-env.yml - USE_CONDA_BUILD=1 - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-pylint.sh - . ./prepare-and-run-pylint.sh loopy test/test_*.py - - displayName: 'Pylint' - -schedules: -- - cron: "0 0 * * 0" - displayName: Weekly build - branches: - include: - - master diff --git a/loopy/__init__.py b/loopy/__init__.py index 67ad7de87decdb8694d7098e3446edf5d043df30..807ce88341a8845a154d853077aea649c0938064 100644 --- a/loopy/__init__.py +++ b/loopy/__init__.py @@ -125,11 +125,10 @@ from loopy.type_inference import infer_unknown_types from loopy.preprocess import preprocess_kernel, realize_reduction from loopy.schedule import ( generate_loop_schedules, get_one_scheduled_kernel, get_one_linearized_kernel) -from loopy.statistics import (ToCountMap, CountGranularity, stringify_stats_mapping, - Op, MemAccess, get_op_poly, get_op_map, get_lmem_access_poly, - get_DRAM_access_poly, get_gmem_access_poly, get_mem_access_map, - get_synchronization_poly, get_synchronization_map, - gather_access_footprints, gather_access_footprint_bytes) +from loopy.statistics import (ToCountMap, CountGranularity, + stringify_stats_mapping, Op, MemAccess, get_op_map, get_mem_access_map, + get_synchronization_map, gather_access_footprints, + gather_access_footprint_bytes) from loopy.codegen import ( PreambleInfo, generate_code, generate_code_v2, generate_body) @@ -256,10 +255,9 @@ __all__ = [ "generate_code", "generate_code_v2", "generate_body", "ToCountMap", "CountGranularity", "stringify_stats_mapping", "Op", - "MemAccess", "get_op_poly", "get_op_map", "get_lmem_access_poly", - "get_DRAM_access_poly", "get_gmem_access_poly", "get_mem_access_map", - "get_synchronization_poly", "get_synchronization_map", - "gather_access_footprints", "gather_access_footprint_bytes", + "MemAccess", "get_op_map", "get_mem_access_map", + "get_synchronization_map", "gather_access_footprints", + "gather_access_footprint_bytes", "CompiledKernel", diff --git a/loopy/kernel/instruction.py b/loopy/kernel/instruction.py index 8213c9584b54917050c586e1b83b6d66d0473798..bcb6faa3fabaebfd89fa46fff44d137915b1e4bb 100644 --- a/loopy/kernel/instruction.py +++ b/loopy/kernel/instruction.py @@ -66,7 +66,8 @@ class InstructionBase(ImmutableRecord): .. attribute:: depends_on_is_final A :class:`bool` determining whether :attr:`depends_on` constitutes - the *entire* list of iname dependencies. + the *entire* list of iname dependencies. If *not* marked final, + various semi-broken heuristics will try to add further dependencies. Defaults to *False*. diff --git a/loopy/statistics.py b/loopy/statistics.py index 10d29daad062744ca3fbe2dc2261be4cd2c4ca99..32fe7741e1298c99e2baf74f3e08e67fc8b2a63e 100755 --- a/loopy/statistics.py +++ b/loopy/statistics.py @@ -1863,75 +1863,4 @@ def gather_access_footprint_bytes(kernel, ignore_uncountable=False): # }}} - -# {{{ compat goop - -def get_lmem_access_poly(knl): - """Count the number of local memory accesses in a loopy kernel. - - get_lmem_access_poly is deprecated. Use get_mem_access_map and filter the - result with the mtype=['local'] option. - - """ - warn_with_kernel(knl, "deprecated_get_lmem_access_poly", - "get_lmem_access_poly is deprecated. Use " - "get_mem_access_map and filter the result with the " - "mtype=['local'] option.") - return get_mem_access_map(knl).filter_by(mtype=['local']) - - -def get_DRAM_access_poly(knl): - """Count the number of global memory accesses in a loopy kernel. - - get_DRAM_access_poly is deprecated. Use get_mem_access_map and filter the - result with the mtype=['global'] option. - - """ - warn_with_kernel(knl, "deprecated_get_DRAM_access_poly", - "get_DRAM_access_poly is deprecated. Use " - "get_mem_access_map and filter the result with the " - "mtype=['global'] option.") - return get_mem_access_map(knl).filter_by(mtype=['global']) - - -def get_gmem_access_poly(knl): - """Count the number of global memory accesses in a loopy kernel. - - get_DRAM_access_poly is deprecated. Use get_mem_access_map and filter the - result with the mtype=['global'] option. - - """ - warn_with_kernel(knl, "deprecated_get_gmem_access_poly", - "get_DRAM_access_poly is deprecated. Use " - "get_mem_access_map and filter the result with the " - "mtype=['global'] option.") - return get_mem_access_map(knl).filter_by(mtype=['global']) - - -def get_synchronization_poly(knl): - """Count the number of synchronization events each work-item encounters in - a loopy kernel. - - get_synchronization_poly is deprecated. Use get_synchronization_map - instead. - - """ - warn_with_kernel(knl, "deprecated_get_synchronization_poly", - "get_synchronization_poly is deprecated. Use " - "get_synchronization_map instead.") - return get_synchronization_map(knl) - - -def get_op_poly(knl, numpy_types=True): - """Count the number of operations in a loopy kernel. - - get_op_poly is deprecated. Use get_op_map instead. - - """ - warn_with_kernel(knl, "deprecated_get_op_poly", - "get_op_poly is deprecated. Use get_op_map instead.") - return get_op_map(knl, numpy_types) - -# }}} - # vim: foldmethod=marker