-
Notifications
You must be signed in to change notification settings - Fork 19
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
Clean Tests & Includes #211
Conversation
Issues seen with `pyflakes` and `ruff`.
@@ -87,8 +87,10 @@ | |||
) # type: numpy.ndarray | |||
|
|||
# host-to-device copy | |||
x_numba = cuda.to_device(x) # type: numba.cuda.cudadrv.devicearray.DeviceNDArray | |||
# x_cupy = cupy.asarray(x_numba) # type: cupy.ndarray | |||
x_numba = cuda.to_device(x) # noqa |
Check notice
Code scanning / CodeQL
Unused local variable Note test
@@ -6,7 +6,7 @@ | |||
|
|||
|
|||
def test_basefab(): | |||
bf = amr.BaseFab_Real() | |||
bf = amr.BaseFab_Real() # noqa |
Check notice
Code scanning / CodeQL
Unused local variable Note test
@@ -4,11 +4,11 @@ | |||
|
|||
|
|||
def test_farraybox(): | |||
fab = amr.FArrayBox() | |||
fab = amr.FArrayBox() # noqa |
Check notice
Code scanning / CodeQL
Unused local variable Note test
|
||
|
||
def test_farraybox_io(): | ||
fab = amr.FArrayBox() | ||
fab = amr.FArrayBox() # noqa |
Check notice
Code scanning / CodeQL
Unused local variable Note test
@@ -115,7 +115,7 @@ | |||
is_periodic = [0, 0, 1] | |||
gm = Gm(box, real_box, coord, is_periodic) | |||
|
|||
pdcity = gm.periodicity() | |||
pdcity = gm.periodicity() # noqa |
Check notice
Code scanning / CodeQL
Unused local variable Note test
@@ -175,7 +175,7 @@ | |||
|
|||
# assign 3: loop through boxes and launch kernels | |||
for mfi in mfab_device: | |||
bx = mfi.tilebox().grow(ngv) | |||
bx = mfi.tilebox().grow(ngv) # noqa |
Check notice
Code scanning / CodeQL
Unused local variable Note test
@@ -268,7 +268,7 @@ | |||
x[...] = 7.0 | |||
|
|||
for mfi in mfab_device: | |||
bx = mfi.tilebox().grow(ngv) | |||
bx = mfi.tilebox().grow(ngv) # noqa |
Check notice
Code scanning / CodeQL
Unused local variable Note test
@@ -306,7 +306,7 @@ | |||
amr.Config.gpu_backend != "CUDA", reason="Requires AMReX_GPU_BACKEND=CUDA" | |||
) | |||
def test_mfab_ops_cuda_cuml(make_mfab_device): | |||
mfab_device = make_mfab_device() | |||
mfab_device = make_mfab_device() # noqa |
Check notice
Code scanning / CodeQL
Unused local variable Note test
@@ -208,7 +208,7 @@ | |||
# assign 3 | |||
with cupyx.profiler.time_range("assign 3 [()]", color_id=0): | |||
for mfi in mfab_device: | |||
bx = mfi.tilebox().grow(ngv) | |||
bx = mfi.tilebox().grow(ngv) # noqa |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning test
redefined
This assignment to 'bx' is unnecessary as it is
redefined
@@ -243,7 +243,7 @@ | |||
return mm | |||
|
|||
for mfi in mfab_device: | |||
bx = mfi.tilebox().grow(ngv) | |||
bx = mfi.tilebox().grow(ngv) # noqa |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning test
Fix issues seen with
pyflakes
andruff
#208.