You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I was loading a tensor into SBUF in this tiling fashion but was encountering some issues where only the last "out_" index returned the correctly loaded values in "weights_mat_mul_2":
I got no compiler issue and yet, since I am loading in sequentially, I expected w_temp to always load correct data into weights_mat_mul_2, as it w_temp was overwritten after every iteration.
weights_mat_mul_2 = nl.ndarray((filter_height, filter_width, n_tiles_c_out, nl.par_dim(c_in_pmax), n_tiles_c_in, c_in_pmax), dtype=W.dtype, buffer=nl.sbuf)
w_temp = nl.ndarray((nl.par_dim(c_in_pmax), n_tiles_c_in, c_in_pmax, filter_height, filter_width), dtype=W.dtype, buffer=nl.sbuf)
for out_ in nl.sequential_range(n_tiles_c_out):
w_temp[...] = nl.load(W_reshaped[out_,:,:,:,:,:])
for fH in nl.affine_range(filter_height):
for fW in nl.affine_range(filter_width):
for in_ in nl.affine_range(n_tiles_c_in):
weights_mat_mul_2[fH,fW,out_,:,in_,:] = w_temp[:,in_,:,fH,fW]
I then tested simulation and every tile in weights_mat_mul_2 contained the correct values. I then tried moving the array "w_temp" declaration into the outermost for loop and all problems were resolved:
weights_mat_mul_2 = nl.ndarray((filter_height, filter_width, n_tiles_c_out, nl.par_dim(c_in_pmax), n_tiles_c_in, c_in_pmax), dtype=W.dtype, buffer=nl.sbuf)
for out_ in nl.sequential_range(n_tiles_c_out):
w_temp = nl.ndarray((nl.par_dim(c_in_pmax), n_tiles_c_in, c_in_pmax, filter_height, filter_width), dtype=W.dtype, buffer=nl.sbuf)
w_temp[...] = nl.load(W_reshaped[out_,:,:,:,:,:])
for fH in nl.affine_range(filter_height):
for fW in nl.affine_range(filter_width):
for in_ in nl.affine_range(n_tiles_c_in):
weights_mat_mul_2[fH,fW,out_,:,in_,:] = w_temp[:,in_,:,fH,fW]
The text was updated successfully, but these errors were encountered:
Hello, I was loading a tensor into SBUF in this tiling fashion but was encountering some issues where only the last "out_" index returned the correctly loaded values in "weights_mat_mul_2":
I got no compiler issue and yet, since I am loading in sequentially, I expected w_temp to always load correct data into weights_mat_mul_2, as it w_temp was overwritten after every iteration.
I then tested simulation and every tile in weights_mat_mul_2 contained the correct values. I then tried moving the array "w_temp" declaration into the outermost for loop and all problems were resolved:
The text was updated successfully, but these errors were encountered: