Skip to content

Commit 403d1c7

Browse files
Merge pull request #54 from HERA-Team/fix-block-size
fix: better block/grid size determination
2 parents f2c8094 + e4c5105 commit 403d1c7

11 files changed

Lines changed: 328 additions & 207 deletions

File tree

.github/workflows/publish-to-pypi.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: push
55
jobs:
66
build-n-publish:
77
name: Deploy
8-
runs-on: ubuntu-18.04
8+
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@master
1111
# https://github.com/ansible/pylibssh/blob/1e7b17f/.github/workflows/build-test-n-publish.yml#L146-L151
@@ -23,7 +23,6 @@ jobs:
2323
run: |
2424
python -m pip install build
2525
python -m pip install setuptools_scm setuptools>42
26-
python setup.py --version
2726
- name: Create setuptools_scm env variable
2827
if: startsWith(github.ref, 'refs/tags/') != true
2928
shell: bash

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,4 @@ docs/_autosummary/*
5353
full-stats-*.txt
5454
stats-*.pkl
5555
summary-stats-*.pkl
56+
.hypothesis/*

gpu-analysis.nvprof

416 KB
Binary file not shown.

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ profile =
5959
line-profiler
6060
pyuvsim>=1.2.5
6161
test =
62+
hypothesis
6263
ipython
6364
matplotlib
6465
pyradiosky
@@ -109,6 +110,7 @@ ignore =
109110
per-file-ignores =
110111
src/vis_cpu/cli.py: T201,T001
111112
tests/*.py: T201,T001,E402
113+
setup.py: D100
112114
max-line-length = 88
113115
max-complexity = 25
114116
rst-roles =

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from setuptools import setup
2+
3+
setup()

src/vis_cpu/_utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ def no_op(fnc):
66
return fnc
77

88

9+
def ceildiv(a: int, b: int) -> int:
10+
"""Ceiling division for integers.
11+
12+
From https://stackoverflow.com/a/17511341/1467820
13+
"""
14+
return -(a // -b)
15+
16+
917
def human_readable_size(size, decimal_places=2, indicate_sign=False):
1018
"""Get a human-readable data size.
1119

src/vis_cpu/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def get_summary_stats(line_data, total_time, ids):
230230
if not assoc_lines:
231231
raise RuntimeError(
232232
f"Could not find any lines for {thing} satisfying '{lines}'. "
233-
f"Possible lines: {' | '.join(list(line_data.keys()))}"
233+
"Possible lines:\n" + "\n".join(list(line_data.keys()))
234234
)
235235

236236
# save (hits, time, time/hits, percent, nlines)

0 commit comments

Comments
 (0)