Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
dad9365
temp spatial_resample
wyli Jan 20, 2022
0f07fc9
fixes resampling
wyli Jan 22, 2022
b09e568
fixes precisions
wyli Jan 23, 2022
0b4bc52
update dict version
wyli Jan 23, 2022
996dacf
fixes unit tests
wyli Jan 23, 2022
2790ca4
adds docs
wyli Jan 23, 2022
4ef11bf
copy grid for resampling
wyli Jan 23, 2022
f65605e
fixes unit tests
wyli Jan 23, 2022
b3011a7
remove normalize coordinates
wyli Jan 25, 2022
a1200dc
[MONAI] python code formatting
monai-bot Jan 25, 2022
7b91be4
try to fix #3621 (#3673)
wyli Jan 25, 2022
ec9aaf3
fixes typing
wyli Jan 25, 2022
0ac197f
fixes grid_sample, interpolate URLs
wyli Jan 25, 2022
87ff30b
Merge branch 'fixes-url' into add-spatial-resample
wyli Jan 25, 2022
080f803
Merge remote-tracking branch 'upstream/dev' into add-spatial-resample
wyli Jan 26, 2022
aee76ee
simplify norm_coords
wyli Jan 26, 2022
0dc88af
update docstring
wyli Jan 26, 2022
d044188
update moveaxis
wyli Jan 26, 2022
7a42452
spatial sample tests
wyli Jan 26, 2022
5ec96a4
additional tests spatial resample
wyli Jan 27, 2022
6509070
test invert saptial resample
wyli Jan 27, 2022
bc9c705
fixes unit tests
wyli Jan 27, 2022
47bf3e2
Merge remote-tracking branch 'upstream/dev' into add-spatial-resample
wyli Jan 27, 2022
da1bc43
rtol assert close
wyli Jan 27, 2022
cb1f12e
fixes TF32 tests
wyli Jan 27, 2022
9e17297
smaller tests
wyli Jan 28, 2022
75c602e
skip when quick testing
wyli Jan 28, 2022
bdd9bc8
Merge remote-tracking branch 'upstream/dev' into add-spatial-resample
wyli Jan 28, 2022
dbaac52
comp tensor and ndarray
wyli Jan 30, 2022
fafb9ee
update based on comments
wyli Jan 30, 2022
40264ea
Merge branch 'dev' into add-spatial-resample
wyli Jan 30, 2022
e532490
fixes tests
wyli Jan 30, 2022
9dea4f7
try to use torch.solve
wyli Jan 30, 2022
451aa51
Merge branch 'dev' into add-spatial-resample
wyli Feb 1, 2022
e94aba7
Revert "fixes tests"
wyli Feb 1, 2022
193e330
update based on comments
wyli Feb 1, 2022
c261df8
Merge branch 'dev' into add-spatial-resample
wyli Feb 1, 2022
c206451
fixes test_affined
wyli Feb 1, 2022
cc3d2c5
default to float32 rotate/randrotate
wyli Feb 2, 2022
18a0b1a
workaround for #3752
wyli Feb 2, 2022
76261d6
default to float32 rotate/randrotate
wyli Feb 2, 2022
cfd80eb
temp test
wyli Feb 2, 2022
0776e9e
update docstring
wyli Feb 3, 2022
0e3261c
Merge branch 'dev' into add-spatial-resample
wyli Feb 3, 2022
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
5 changes: 4 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: integration
on:
repository_dispatch:
type: [integration-test-command]
push:
branches:
- add-spatial-resample

jobs:
integration-py3:
Expand Down Expand Up @@ -32,7 +35,7 @@ jobs:
- name: Install the dependencies
run: |
which python
python -m pip install --upgrade pip wheel
python -m pip install --upgrade pip==21.3.1 wheel # workaround monai##3752
python -m pip uninstall -y torch torchvision
python -m pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 -f https://download.pytorch.org/whl/torch_stable.html
python -m pip install -r requirements-dev.txt
Expand Down
12 changes: 12 additions & 0 deletions docs/source/transforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,12 @@ Post-processing
Spatial
^^^^^^^

`SpatialResample`
"""""""""""""""""
.. autoclass:: SpatialResample
:members:
:special-members: __call__

`Spacing`
"""""""""
.. image:: https://github.com/Project-MONAI/DocImages/raw/main/transforms/Spacing.png
Expand Down Expand Up @@ -1398,6 +1404,12 @@ Post-processing (Dict)
Spatial (Dict)
^^^^^^^^^^^^^^

`SpatialResampled`
""""""""""""""""""
.. autoclass:: SpatialResampled
:members:
:special-members: __call__

`Spacingd`
""""""""""
.. image:: https://github.com/Project-MONAI/DocImages/raw/main/transforms/Spacingd.png
Expand Down
10 changes: 5 additions & 5 deletions monai/apps/deepgrow/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ class SpatialCropForegroundd(MapTransform):
the meta data is a dictionary object which contains: filename, original_shape, etc.
it can be a sequence of string, map to the `keys`.
if None, will try to construct meta_keys by `key_{meta_key_postfix}`.
meta_key_postfix: if meta_keys is None, use `{key}_{meta_key_postfix}` to to fetch/store the meta data according
meta_key_postfix: if meta_keys is None, use `{key}_{meta_key_postfix}` to fetch/store the meta data according
to the key data, default is `meta_dict`, the meta data is a dictionary object.
For example, to handle key `image`, read/write affine matrices from the
metadata `image_meta_dict` dictionary's `affine` field.
Expand Down Expand Up @@ -474,7 +474,7 @@ class AddGuidanceFromPointsd(Transform):
for example, for data with key `image`, the metadata by default is in `image_meta_dict`.
the meta data is a dictionary object which contains: filename, original_shape, etc.
if None, will try to construct meta_keys by `{ref_image}_{meta_key_postfix}`.
meta_key_postfix: if meta_key is None, use `{ref_image}_{meta_key_postfix}` to to fetch the meta data according
meta_key_postfix: if meta_key is None, use `{ref_image}_{meta_key_postfix}` to fetch the meta data according
to the key data, default is `meta_dict`, the meta data is a dictionary object.
For example, to handle key `image`, read/write affine matrices from the
metadata `image_meta_dict` dictionary's `affine` field.
Expand Down Expand Up @@ -589,7 +589,7 @@ class SpatialCropGuidanced(MapTransform):
the meta data is a dictionary object which contains: filename, original_shape, etc.
it can be a sequence of string, map to the `keys`.
if None, will try to construct meta_keys by `key_{meta_key_postfix}`.
meta_key_postfix: if meta_keys is None, use `key_{postfix}` to to fetch the meta data according
meta_key_postfix: if meta_keys is None, use `key_{postfix}` to fetch the meta data according
to the key data, default is `meta_dict`, the meta data is a dictionary object.
For example, to handle key `image`, read/write affine matrices from the
metadata `image_meta_dict` dictionary's `affine` field.
Expand Down Expand Up @@ -787,7 +787,7 @@ class RestoreLabeld(MapTransform):
the meta data is a dictionary object which contains: filename, original_shape, etc.
it can be a sequence of string, map to the `keys`.
if None, will try to construct meta_keys by `key_{meta_key_postfix}`.
meta_key_postfix: if meta_key is None, use `key_{meta_key_postfix} to to fetch the meta data according
meta_key_postfix: if meta_key is None, use `key_{meta_key_postfix} to fetch the meta data according
to the key data, default is `meta_dict`, the meta data is a dictionary object.
For example, to handle key `image`, read/write affine matrices from the
metadata `image_meta_dict` dictionary's `affine` field.
Expand Down Expand Up @@ -897,7 +897,7 @@ class Fetch2DSliced(MapTransform):
the meta data is a dictionary object which contains: filename, original_shape, etc.
it can be a sequence of string, map to the `keys`.
if None, will try to construct meta_keys by `key_{meta_key_postfix}`.
meta_key_postfix: use `key_{meta_key_postfix}` to to fetch the meta data according to the key data,
meta_key_postfix: use `key_{meta_key_postfix}` to fetch the meta data according to the key data,
default is `meta_dict`, the meta data is a dictionary object.
For example, to handle key `image`, read/write affine matrices from the
metadata `image_meta_dict` dictionary's `affine` field.
Expand Down
2 changes: 2 additions & 0 deletions monai/csrc/ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
py::enum_<monai::BoundType>(m, "BoundType")
.value("replicate", monai::BoundType::Replicate, "a a a | a b c d | d d d")
.value("nearest", monai::BoundType::Replicate, "a a a | a b c d | d d d")
.value("border", monai::BoundType::Replicate, "a a a | a b c d | d d d")
.value("dct1", monai::BoundType::DCT1, "d c b | a b c d | c b a")
.value("mirror", monai::BoundType::DCT1, "d c b | a b c d | c b a")
.value("dct2", monai::BoundType::DCT2, "c b a | a b c d | d c b")
Expand All @@ -43,6 +44,7 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
.value("wrap", monai::BoundType::DFT, "b c d | a b c d | a b c")
// .value("sliding", monai::BoundType::Sliding)
.value("zero", monai::BoundType::Zero, "0 0 0 | a b c d | 0 0 0")
.value("zeros", monai::BoundType::Zero, "0 0 0 | a b c d | 0 0 0")
.export_values();

// resample interpolation mode
Expand Down
97 changes: 23 additions & 74 deletions monai/csrc/resample/pushpull_cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1527,10 +1527,10 @@ MONAI_NAMESPACE_DEVICE { // cpu
iy0 = bound::index(bound1, iy0, src_Y);
iz0 = bound::index(bound2, iz0, src_Z);

// Offsets into source volume
offset_t o000, o100, o010, o001, o110, o011, o101, o111;

if (do_pull || do_grad || do_sgrad) {
// Offsets into source volume
o000 = ix0 * src_sX + iy0 * src_sY + iz0 * src_sZ;
o100 = ix1 * src_sX + iy0 * src_sY + iz0 * src_sZ;
o010 = ix0 * src_sX + iy1 * src_sY + iz0 * src_sZ;
Expand All @@ -1539,18 +1539,20 @@ MONAI_NAMESPACE_DEVICE { // cpu
o011 = ix0 * src_sX + iy1 * src_sY + iz1 * src_sZ;
o101 = ix1 * src_sX + iy0 * src_sY + iz1 * src_sZ;
o111 = ix1 * src_sX + iy1 * src_sY + iz1 * src_sZ;
} else {
// Offsets into 'push' volume
o000 = ix0 * out_sX + iy0 * out_sY + iz0 * out_sZ;
o100 = ix1 * out_sX + iy0 * out_sY + iz0 * out_sZ;
o010 = ix0 * out_sX + iy1 * out_sY + iz0 * out_sZ;
o001 = ix0 * out_sX + iy0 * out_sY + iz1 * out_sZ;
o110 = ix1 * out_sX + iy1 * out_sY + iz0 * out_sZ;
o011 = ix0 * out_sX + iy1 * out_sY + iz1 * out_sZ;
o101 = ix1 * out_sX + iy0 * out_sY + iz1 * out_sZ;
o111 = ix1 * out_sX + iy1 * out_sY + iz1 * out_sZ;
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~ Grid gradient ~~~~~~~~~~~~~~~~~~~~~~~~~~
if (do_grad) {
o000 = ix0 * src_sX + iy0 * src_sY + iz0 * src_sZ;
o100 = ix1 * src_sX + iy0 * src_sY + iz0 * src_sZ;
o010 = ix0 * src_sX + iy1 * src_sY + iz0 * src_sZ;
o001 = ix0 * src_sX + iy0 * src_sY + iz1 * src_sZ;
o110 = ix1 * src_sX + iy1 * src_sY + iz0 * src_sZ;
o011 = ix0 * src_sX + iy1 * src_sY + iz1 * src_sZ;
o101 = ix1 * src_sX + iy0 * src_sY + iz1 * src_sZ;
o111 = ix1 * src_sX + iy1 * src_sY + iz1 * src_sZ;
scalar_t gx = static_cast<scalar_t>(0);
scalar_t gy = static_cast<scalar_t>(0);
scalar_t gz = static_cast<scalar_t>(0);
Expand Down Expand Up @@ -1659,14 +1661,6 @@ MONAI_NAMESPACE_DEVICE { // cpu
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pull ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (do_pull) {
o000 = ix0 * src_sX + iy0 * src_sY + iz0 * src_sZ;
o100 = ix1 * src_sX + iy0 * src_sY + iz0 * src_sZ;
o010 = ix0 * src_sX + iy1 * src_sY + iz0 * src_sZ;
o001 = ix0 * src_sX + iy0 * src_sY + iz1 * src_sZ;
o110 = ix1 * src_sX + iy1 * src_sY + iz0 * src_sZ;
o011 = ix0 * src_sX + iy1 * src_sY + iz1 * src_sZ;
o101 = ix1 * src_sX + iy0 * src_sY + iz1 * src_sZ;
o111 = ix1 * src_sX + iy1 * src_sY + iz1 * src_sZ;
scalar_t* out_ptr_NCXYZ = out_ptr + n * out_sN + w * out_sX + h * out_sY + d * out_sZ;
scalar_t* src_ptr_NC = src_ptr + n * src_sN;
for (offset_t c = 0; c < C; ++c, out_ptr_NCXYZ += out_sC, src_ptr_NC += src_sC) {
Expand All @@ -1678,14 +1672,6 @@ MONAI_NAMESPACE_DEVICE { // cpu
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SGrad ~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
else if (do_sgrad) {
o000 = ix0 * src_sX + iy0 * src_sY + iz0 * src_sZ;
o100 = ix1 * src_sX + iy0 * src_sY + iz0 * src_sZ;
o010 = ix0 * src_sX + iy1 * src_sY + iz0 * src_sZ;
o001 = ix0 * src_sX + iy0 * src_sY + iz1 * src_sZ;
o110 = ix1 * src_sX + iy1 * src_sY + iz0 * src_sZ;
o011 = ix0 * src_sX + iy1 * src_sY + iz1 * src_sZ;
o101 = ix1 * src_sX + iy0 * src_sY + iz1 * src_sZ;
o111 = ix1 * src_sX + iy1 * src_sY + iz1 * src_sZ;
scalar_t* out_ptr_NCXYZ = out_ptr + n * out_sN + w * out_sX + h * out_sY + d * out_sZ;
scalar_t* src_ptr_NC = src_ptr + n * src_sN;

Expand Down Expand Up @@ -1758,16 +1744,6 @@ MONAI_NAMESPACE_DEVICE { // cpu
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Push ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (do_count) {
// Offsets into 'push' volume
o000 = ix0 * out_sX + iy0 * out_sY + iz0 * out_sZ;
o100 = ix1 * out_sX + iy0 * out_sY + iz0 * out_sZ;
o010 = ix0 * out_sX + iy1 * out_sY + iz0 * out_sZ;
o001 = ix0 * out_sX + iy0 * out_sY + iz1 * out_sZ;
o110 = ix1 * out_sX + iy1 * out_sY + iz0 * out_sZ;
o011 = ix0 * out_sX + iy1 * out_sY + iz1 * out_sZ;
o101 = ix1 * out_sX + iy0 * out_sY + iz1 * out_sZ;
o111 = ix1 * out_sX + iy1 * out_sY + iz1 * out_sZ;

scalar_t* out_ptr_N = out_ptr + n * out_sN;
bound::add(out_ptr_N, o000, w000, s000);
bound::add(out_ptr_N, o100, w100, s100);
Expand Down Expand Up @@ -1822,21 +1798,23 @@ MONAI_NAMESPACE_DEVICE { // cpu
ix0 = bound::index(bound0, ix0, src_X);
iy0 = bound::index(bound1, iy0, src_Y);

// Offsets into source volume
offset_t o00, o10, o01, o11;
if (do_pull || do_grad || do_sgrad) {
// Offsets into source volume
o00 = ix0 * src_sX + iy0 * src_sY;
o10 = ix1 * src_sX + iy0 * src_sY;
o01 = ix0 * src_sX + iy1 * src_sY;
o11 = ix1 * src_sX + iy1 * src_sY;
} else {
// Offsets into 'push' volume
o00 = ix0 * out_sX + iy0 * out_sY;
o10 = ix1 * out_sX + iy0 * out_sY;
o01 = ix0 * out_sX + iy1 * out_sY;
o11 = ix1 * out_sX + iy1 * out_sY;
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~ Grid gradient ~~~~~~~~~~~~~~~~~~~~~~~~~~
if (do_grad) {
o00 = ix0 * src_sX + iy0 * src_sY;
o10 = ix1 * src_sX + iy0 * src_sY;
o01 = ix0 * src_sX + iy1 * src_sY;
o11 = ix1 * src_sX + iy1 * src_sY;
scalar_t gx = static_cast<scalar_t>(0);
scalar_t gy = static_cast<scalar_t>(0);
scalar_t* trgt_ptr_NCXY = trgt_ptr + n * trgt_sN + w * trgt_sX + h * trgt_sY;
Expand Down Expand Up @@ -1895,10 +1873,6 @@ MONAI_NAMESPACE_DEVICE { // cpu
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pull ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (do_pull) {
o00 = ix0 * src_sX + iy0 * src_sY;
o10 = ix1 * src_sX + iy0 * src_sY;
o01 = ix0 * src_sX + iy1 * src_sY;
o11 = ix1 * src_sX + iy1 * src_sY;
scalar_t* out_ptr_NCXY = out_ptr + n * out_sN + w * out_sX + h * out_sY;
scalar_t* src_ptr_NC = src_ptr + n * src_sN;
for (offset_t c = 0; c < C; ++c, out_ptr_NCXY += out_sC, src_ptr_NC += src_sC) {
Expand All @@ -1908,10 +1882,6 @@ MONAI_NAMESPACE_DEVICE { // cpu
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SGrad ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (do_sgrad) {
o00 = ix0 * src_sX + iy0 * src_sY;
o10 = ix1 * src_sX + iy0 * src_sY;
o01 = ix0 * src_sX + iy1 * src_sY;
o11 = ix1 * src_sX + iy1 * src_sY;
scalar_t* out_ptr_NCXY = out_ptr + n * out_sN + w * out_sX + h * out_sY;
scalar_t* src_ptr_NC = src_ptr + n * src_sN;

Expand All @@ -1926,11 +1896,6 @@ MONAI_NAMESPACE_DEVICE { // cpu
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Push ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (do_push) {
// Offsets into 'push' volume
o00 = ix0 * out_sX + iy0 * out_sY;
o10 = ix1 * out_sX + iy0 * out_sY;
o01 = ix0 * out_sX + iy1 * out_sY;
o11 = ix1 * out_sX + iy1 * out_sY;
scalar_t* trgt_ptr_NCXY = trgt_ptr + n * trgt_sN + w * trgt_sX + h * trgt_sY;
scalar_t* out_ptr_NC = out_ptr + n * out_sN;
if (trgt_K == 0) {
Expand Down Expand Up @@ -1960,12 +1925,6 @@ MONAI_NAMESPACE_DEVICE { // cpu
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Push ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (do_count) {
// Offsets into 'push' volume
o00 = ix0 * out_sX + iy0 * out_sY;
o10 = ix1 * out_sX + iy0 * out_sY;
o01 = ix0 * out_sX + iy1 * out_sY;
o11 = ix1 * out_sX + iy1 * out_sY;

scalar_t* out_ptr_N = out_ptr + n * out_sN;
bound::add(out_ptr_N, o00, w00, s00);
bound::add(out_ptr_N, o10, w10, s10);
Expand Down Expand Up @@ -1996,20 +1955,21 @@ MONAI_NAMESPACE_DEVICE { // cpu
ix1 = bound::index(bound0, ix0 + 1, src_X);
ix0 = bound::index(bound0, ix0, src_X);

// Offsets into source volume
offset_t o0, o1;
if (do_pull || do_grad || do_sgrad) {
// Offsets into source volume
o0 = ix0 * src_sX;
o1 = ix1 * src_sX;
} else {
// Offsets into 'push' volume
o0 = ix0 * out_sX;
o1 = ix1 * out_sX;
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~ Grid gradient ~~~~~~~~~~~~~~~~~~~~~~~~~~
if (do_grad) {
if (trgt_K == 0) {
// backward w.r.t. push/pull

o0 = ix0 * src_sX;
o1 = ix1 * src_sX;
scalar_t gx = static_cast<scalar_t>(0);
scalar_t* trgt_ptr_NCX = trgt_ptr + n * trgt_sN + w * trgt_sX;
scalar_t* src_ptr_NC = src_ptr + n * src_sN;
Expand Down Expand Up @@ -2037,8 +1997,6 @@ MONAI_NAMESPACE_DEVICE { // cpu
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pull ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (do_pull) {
o0 = ix0 * src_sX;
o1 = ix1 * src_sX;
scalar_t* out_ptr_NCX = out_ptr + n * out_sN + w * out_sX;
scalar_t* src_ptr_NC = src_ptr + n * src_sN;
for (offset_t c = 0; c < C; ++c, out_ptr_NCX += out_sC, src_ptr_NC += src_sC) {
Expand All @@ -2047,8 +2005,6 @@ MONAI_NAMESPACE_DEVICE { // cpu
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SGrad ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (do_sgrad) {
o0 = ix0 * src_sX;
o1 = ix1 * src_sX;
scalar_t* out_ptr_NCX = out_ptr + n * out_sN + w * out_sX;
scalar_t* src_ptr_NC = src_ptr + n * src_sN;

Expand All @@ -2058,9 +2014,6 @@ MONAI_NAMESPACE_DEVICE { // cpu
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Push ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (do_push) {
// Offsets into 'push' volume
o0 = ix0 * out_sX;
o1 = ix1 * out_sX;
scalar_t* trgt_ptr_NCX = trgt_ptr + n * trgt_sN + w * trgt_sX;
scalar_t* out_ptr_NC = out_ptr + n * out_sN;
if (trgt_K == 0) {
Expand All @@ -2081,10 +2034,6 @@ MONAI_NAMESPACE_DEVICE { // cpu
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Push ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (do_count) {
// Offsets into 'push' volume
o0 = ix0 * out_sX;
o1 = ix1 * out_sX;

scalar_t* out_ptr_N = out_ptr + n * out_sN;
bound::add(out_ptr_N, o0, w0, s0);
bound::add(out_ptr_N, o1, w1, s1);
Expand Down
Loading