Skip to content

Commit

Permalink
Merge pull request #2305 from devitocodes/cire_dim_names
Browse files Browse the repository at this point in the history
compiler: Adjust names used for cire-rotate dimensions
  • Loading branch information
FabioLuporini authored Feb 16, 2024
2 parents 747c0fe + d216ead commit 313c980
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion devito/passes/clusters/aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def optimize_schedule_rotations(schedule, sregistry):
iib = candidate.upper

ii = ModuloDimension('%sii' % d.root.name, ds, iis, incr=iib)
cd = CustomDimension(name='%s%s' % (d.root.name, d.root.name), symbolic_min=ii,
cd = CustomDimension(name='%sc' % d.root.name, symbolic_min=ii,
symbolic_max=iib, symbolic_size=n)
dsi = ModuloDimension('%si' % ds.root.name, cd, cd + ds - iis, n)

Expand Down
4 changes: 2 additions & 2 deletions examples/performance/00_overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1360,12 +1360,12 @@
" {\n",
" for (int y = y0_blk0, ys = 0, yr0 = (ys)%(5), yr1 = (ys + 3)%(5), yr2 = (ys + 4)%(5), yr3 = (ys + 1)%(5), yii = -2; y <= MIN(y_M, y0_blk0 + y0_blk0_size - 1); y += 1, ys += 1, yr0 = (ys)%(5), yr1 = (ys + 3)%(5), yr2 = (ys + 4)%(5), yr3 = (ys + 1)%(5), yii = 2)\n",
" {\n",
" for (int yy = yii, yi = (yy + ys + 2)%(5); yy <= 2; yy += 1, yi = (yy + ys + 2)%(5))\n",
" for (int yc = yii, yi = (yc + ys + 2)%(5); yc <= 2; yc += 1, yi = (yc + ys + 2)%(5))\n",
" {\n",
" #pragma omp simd aligned(u:32)\n",
" for (int z = z_m; z <= z_M; z += 1)\n",
" {\n",
" r2[yi][z] = r1*(8.33333333e-2F*(u[t0][x + 4][y + yy + 2][z + 4] - u[t0][x + 4][y + yy + 6][z + 4]) + 6.66666667e-1F*(-u[t0][x + 4][y + yy + 3][z + 4] + u[t0][x + 4][y + yy + 5][z + 4]));\n",
" r2[yi][z] = r1*(8.33333333e-2F*(u[t0][x + 4][y + yc + 2][z + 4] - u[t0][x + 4][y + yc + 6][z + 4]) + 6.66666667e-1F*(-u[t0][x + 4][y + yc + 3][z + 4] + u[t0][x + 4][y + yc + 5][z + 4]));\n",
" }\n",
" }\n",
" #pragma omp simd aligned(f,u:32)\n",
Expand Down
6 changes: 3 additions & 3 deletions tests/test_dse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2335,10 +2335,10 @@ def test_blocking_options(self, rotate):
if rotate:
assert_structure(
op1,
prefix + ['t,x0_blk0,y0_blk0,x0_blk1,y0_blk1,x,xx,y,z',
't,x0_blk0,y0_blk0,x0_blk1,y0_blk1,x,y,yy,z',
prefix + ['t,x0_blk0,y0_blk0,x0_blk1,y0_blk1,x,xc,y,z',
't,x0_blk0,y0_blk0,x0_blk1,y0_blk1,x,y,yc,z',
't,x0_blk0,y0_blk0,x0_blk1,y0_blk1,x,y,z'],
't,x0_blk0,y0_blk0,x0_blk1,y0_blk1,x,xx,y,z,y,yy,z,z'
't,x0_blk0,y0_blk0,x0_blk1,y0_blk1,x,xc,y,z,y,yc,z,z'
)
else:
assert_structure(
Expand Down

0 comments on commit 313c980

Please sign in to comment.