Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ability to do vector-vector loop #75

Merged
merged 48 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
2fe40e0
feat: add ability to do vector-vector loop
steven-murray Dec 4, 2023
eab2dff
test: fix new cublas test
steven-murray Dec 4, 2023
0ae70a3
feat: completely overhauled algorithm that is easier to follow
steven-murray Dec 13, 2023
1dfb360
fix: profiling cli
steven-murray Dec 13, 2023
92ee8f7
fix: profiling cli
steven-murray Dec 13, 2023
3a18bca
cli: refactor get_label
steven-murray Dec 14, 2023
64ffc3e
perf: re-order feed/ax axes in interpolated beams
steven-murray Dec 14, 2023
6f9ffda
maint: conditional import of gpu subpackage
steven-murray Dec 15, 2023
ae7883e
maint: conditional import of gpu subpackage in cli
steven-murray Dec 15, 2023
68f6518
fix: cli label
steven-murray Dec 15, 2023
d06be60
fix: cli label
steven-murray Dec 15, 2023
9895473
cli: add option to change naz/nza for profiling
steven-murray Dec 15, 2023
3638c26
cli: add option to change naz/nza for profiling
steven-murray Dec 15, 2023
bdb5fe6
fix: summing for gpu with nchunks>1
steven-murray Dec 15, 2023
18cbf28
fix: summing for gpu with nchunks>1
steven-murray Dec 15, 2023
136feb0
fix: use more than 0.5 GB GPU memory
steven-murray Dec 15, 2023
f1a45e8
fix: memory estimate for ant-vis
steven-murray Dec 18, 2023
af7d3e2
feat: add --nchunks param to cli
steven-murray Dec 18, 2023
ecbeff8
perf: reduce memory usage in getz
steven-murray Dec 18, 2023
74de314
ux: extra debugging logging
steven-murray Dec 18, 2023
662fd73
perf: use initial memory cache
steven-murray Dec 18, 2023
317f205
ux: add source buffer to CLI
steven-murray Dec 18, 2023
c46b658
perf: don't require extra copy of beams for nbeams=1
steven-murray Dec 18, 2023
8aa3071
perf: use beam_idx=None in CLI
steven-murray Dec 18, 2023
c779593
fix: using beam_idx=None
steven-murray Dec 18, 2023
0d5d189
fix: properly slice the fluxes as well as crds
steven-murray Dec 21, 2023
a307e39
merge main
steven-murray Sep 4, 2024
f808a45
feat: add new ways to rotate coords
steven-murray Sep 5, 2024
3bdd874
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 5, 2024
918c9d6
upgrades to the cli profile
steven-murray Sep 5, 2024
7d0f884
Merge branch 'vector-vector' of github.com:hera-team/matvis into vect…
steven-murray Sep 5, 2024
5413164
use map_coordinates in pyuvdata
steven-murray Sep 5, 2024
65ce53e
fi: error in list comprehension
steven-murray Sep 5, 2024
6454b57
perf: add update_bcrs_every parameter
steven-murray Sep 6, 2024
35d8daa
feat: allow order>1 for gpu beam interp
steven-murray Sep 10, 2024
a2fc980
test: added and streamlined many tests
steven-murray Sep 11, 2024
cb9d891
ci: don't force gpu tests
steven-murray Sep 11, 2024
65ba661
ci: gpu tests env update
steven-murray Sep 11, 2024
2b28dcb
test: don't run gpu tests if it's not available
steven-murray Sep 11, 2024
a489c0e
test: don't run gpu tests if it's not available
steven-murray Sep 11, 2024
48e9802
ci: don't run plot tests
steven-murray Sep 11, 2024
59531a7
ci: try better self-hosted mamba env
steven-murray Sep 11, 2024
b53968e
ci: try better self-hosted mamba env
steven-murray Sep 11, 2024
182eaa6
ci: try better self-hosted mamba env
steven-murray Sep 11, 2024
92dd374
ci: try better self-hosted mamba env
steven-murray Sep 11, 2024
719b6d3
ci: use token for codecov
steven-murray Sep 12, 2024
f781630
ci: use token for codecov
steven-murray Sep 12, 2024
bef352a
docs: update notebook to use new coordinates
steven-murray Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions .github/workflows/test_suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,26 @@ jobs:
run: |
python -m pytest --ignore tests/test_plot.py --cov=matvis --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 --log-cli-level=${{ env.LOG_LEVEL}}

- name: Run Plotting Tests
if: matrix.python-version != '3.9' || matrix.os == 'macos-latest'
run: |
python -m pytest tests/test_plot.py --cov=matvis --cov-config=.coveragerc --cov-append --cov-report xml:./coverage.xml --durations=25 --log-cli-level=INFO

- name: Upload coverage report
uses: codecov/codecov-action@v3.1.3
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}


gpu_tests:
env:
ENV_NAME: tests
PYTHON: "3.10"
PYTHON: "3.12"
OS: Ubuntu
name: Self-Hosted Tests (GPU)
runs-on: [self-hosted, gpu]

defaults:
run:
shell: bash -el {0}
steps:
- name: Add Home to PATH
run: |
Expand All @@ -76,28 +75,30 @@ jobs:
with:
node-version: 16

- uses: actions/checkout@v3.6.0
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON }}

- name: Install
run: |
echo $(whoami)
source ~/.bashrc
micromamba activate testenv
echo $(which pip)
pip install .[test,gpu]
python -m pip install --upgrade pip
python -m pip install .[test,gpu]

- name: Run Tests
run: |
source ~/.bashrc
micromamba activate testenv
python -m pytest -k "gpu" --cov=matvis --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 --log-cli-level=INFO

- name: Upload coverage report
uses: codecov/codecov-action@v3.1.3
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
- flake8-print

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black

Expand Down
3 changes: 2 additions & 1 deletion ci/test-env.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: tests
name: testenv
channels:
- conda-forge
- defaults
Expand All @@ -15,6 +15,7 @@ dependencies:
- h5py>=3.2
- ffmpeg
- pyuvdata # For testing when using UVBeam object
- cupy
- pip:
- pyuvsim[sim]>=1.2
- pyradiosky>=0.1.1
157 changes: 44 additions & 113 deletions docs/tutorials/matvis_tutorial.ipynb

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ classifiers =
packages = find_namespace:
install_requires =
astropy
numpy
click
docstring-parser
line-profiler
numpy>=2.0
psutil
pyuvdata>=2.2.8
pyuvdata@git+https://github.com/RadioAstronomySoftwareGroup/pyuvdata
rich
scipy
python_requires = >=3.9
include_package_data = True
Expand Down Expand Up @@ -51,20 +55,21 @@ docs =
numpydoc
sphinx
gpu =
cupy
jinja2
pycuda
scikit-cuda
profile =
click
line-profiler
pyuvsim>=1.2.5
test =
astropy-healpix
hypothesis
ipython
matplotlib
pyradiosky
pytest
pytest-cov
pytest-lazy-fixtures
pyuvsim[sim]>=1.2.5

[test]
Expand Down Expand Up @@ -107,6 +112,7 @@ ignore =
D401
B007
G004
D107
per-file-ignores =
src/matvis/cli.py: T201,T001
tests/*.py: T201,T001,E402
Expand Down
7 changes: 5 additions & 2 deletions src/matvis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@
del get_distribution, DistributionNotFound

try:
import pycuda
import cupy

HAVE_GPU = True
except ImportError:
HAVE_GPU = False


from . import cpu, gpu, plot
from . import cpu
from .wrapper import simulate_vis

if HAVE_GPU:
from . import gpu

DATA_PATH = Path(__file__).parent / "data"

del Path
Loading
Loading