Skip to content

Commit 811a16c

Browse files
committed
Remove name clash
1 parent dbf24f3 commit 811a16c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/host/linalg.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -366,19 +366,19 @@ function generic_matmatmul!(C::AbstractGPUMatrix{R}, A::AbstractGPUMatrix{T}, B:
366366
# number of tiles depends on inner dimension
367367
@uniform NUM_TILES = div(Q + TILE_DIM - 1, TILE_DIM)
368368

369-
I = (grow - 1) * TILE_DIM + tile_row
370-
J = (gcol - 1) * TILE_DIM + tile_col
369+
glob_I = (grow - 1) * TILE_DIM + tile_row
370+
glob_J = (gcol - 1) * TILE_DIM + tile_col
371371

372372
# loop over all tiles needed for this calculation
373373
for t in 0:(NUM_TILES - 1)
374374
# load inputs into tiles, with bounds checking for non-square matrices
375-
if I <= N && t * TILE_DIM + tile_col <= Q
376-
@inbounds tile1[tile_row, tile_col] = input1[I, t * TILE_DIM + tile_col]
375+
if glob_I <= N && t * TILE_DIM + tile_col <= Q
376+
@inbounds tile1[tile_row, tile_col] = input1[glob_I, t * TILE_DIM + tile_col]
377377
else
378378
@inbounds tile1[tile_row, tile_col] = zero(R)
379379
end
380-
if J <= M && t * TILE_DIM + tile_row <= Q
381-
@inbounds tile2[tile_row, tile_col] = input2[t * TILE_DIM + tile_row, J]
380+
if glob_J <= M && t * TILE_DIM + tile_row <= Q
381+
@inbounds tile2[tile_row, tile_col] = input2[t * TILE_DIM + tile_row, glob_J]
382382
else
383383
@inbounds tile2[tile_row, tile_col] = zero(R)
384384
end
@@ -397,8 +397,8 @@ function generic_matmatmul!(C::AbstractGPUMatrix{R}, A::AbstractGPUMatrix{T}, B:
397397
end
398398

399399
# save if inbounds
400-
if I <= N && J <= M
401-
@inbounds output[I, J] = add(outval[1], output[I, J])
400+
if glob_I <= N && glob_J <= M
401+
@inbounds output[glob_I, glob_J] = add(outval[1], output[glob_I, glob_J])
402402
end
403403
end
404404

0 commit comments

Comments
 (0)