diff --git a/lecture_014/A_Practitioners_Guide_to_Triton.ipynb b/lecture_014/A_Practitioners_Guide_to_Triton.ipynb index af4503e..ff20146 100644 --- a/lecture_014/A_Practitioners_Guide_to_Triton.ipynb +++ b/lecture_014/A_Practitioners_Guide_to_Triton.ipynb @@ -423,14 +423,14 @@ " mask = offs < n # <- this is a vector of bools!\n", " \n", " # read data\n", - " x_values = x[offs] # <- a vector is read!\n", - " y_values = y[offs] # <- a vector is read!\n", + " x_values = x[offs[mask]] # <- a vector is read!\n", + " y_values = y[offs[mask]] # <- a vector is read!\n", " \n", " # do operation\n", " z_value = x_value + y_value # <- vectors are added!\n", " \n", " # write data\n", - " z[offs] = z_value # <- a vector is written!" + " z[offs[mask]] = z_value # <- a vector is written!" ] }, {