forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
289 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/plugins/intel_gpu/src/kernel_selector/cl_kernels/rope_ref.cl.rej
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
diff a/src/plugins/intel_gpu/src/kernel_selector/cl_kernels/rope_ref.cl b/src/plugins/intel_gpu/src/kernel_selector/cl_kernels/rope_ref.cl (rejected hunks) | ||
@@ -28,11 +28,14 @@ KERNEL(rope_ref)( | ||
uint r = rf < HALF_ROTARY_NDIMS ? rf * 2 : 0; | ||
uint f = rf < HEAD_SIZE - ROTARY_NDIMS ? rf * 2 : 0; | ||
|
||
- uint input_idx = INPUT0_GET_INDEX(p, b, h * HEAD_SIZE, 0); | ||
#ifdef ENABLE_SLICE | ||
- input_idx += SLICED_FROM_START; | ||
-#endif | ||
+ uint input_idx = GET_DATA_INDEX(SLICED_INPUT0, p, b, h * HEAD_SIZE, 0); | ||
|
||
+ input_idx += SLICED_FROM_START * (p * INPUT0_FEATURE_NUM + b + 1) | ||
+ + SLICED_FROM_END * (p * INPUT0_FEATURE_NUM + b); | ||
+#else | ||
+ uint input_idx = INPUT0_GET_INDEX(p, b, h * HEAD_SIZE, 0); | ||
+#endif | ||
uint cos_sin_p = p < INPUT1_BATCH_NUM ? p : 0; | ||
uint cos_sin_b = b < INPUT1_FEATURE_NUM ? b : 0; | ||
uint cos_sin_idx = INPUT1_GET_INDEX(cos_sin_p, cos_sin_b, 0, 0); | ||
@@ -66,11 +69,14 @@ KERNEL(rope_ref)( | ||
const uint h = (uint)get_global_id(2) / HALF_ROTARY_NDIMS; | ||
const uint r = (uint)get_global_id(2) % HALF_ROTARY_NDIMS; | ||
|
||
- uint input_idx = INPUT0_GET_INDEX(b, p, h * HEAD_SIZE, 0); | ||
#ifdef ENABLE_SLICE | ||
- input_idx += SLICED_FROM_START; | ||
-#endif | ||
+ uint input_idx = GET_DATA_INDEX(SLICED_INPUT0, b, p, h * HEAD_SIZE, 0); | ||
|
||
+ input_idx += SLICED_FROM_START * (b * INPUT0_FEATURE_NUM + p + 1) | ||
+ + SLICED_FROM_END * (b * INPUT0_FEATURE_NUM + p); | ||
+#else | ||
+ uint input_idx = INPUT0_GET_INDEX(b, p, h * HEAD_SIZE, 0); | ||
+#endif | ||
uint cos_sin_b = b < INPUT1_BATCH_NUM ? b : 0; | ||
uint cos_sin_p = p + INPUT1_FEATURE_NUM - INPUT0_FEATURE_NUM < INPUT1_FEATURE_NUM ? p + INPUT1_FEATURE_NUM - INPUT0_FEATURE_NUM : 0; | ||
uint cos_sin_h = h < INPUT1_SIZE_Y ? h : 0; | ||
@@ -113,13 +119,15 @@ KERNEL(rope_ref)( | ||
const uint p = (uint)get_global_id(2) / HALF_ROTARY_NDIMS; | ||
const uint r = (uint)get_global_id(2) % HALF_ROTARY_NDIMS; | ||
|
||
-#if ENABLE_TRANSPOSE | ||
- uint input_idx = INPUT0_GET_INDEX(b, p, h, 0); | ||
+#ifdef ENABLE_SLICE | ||
+ uint input_idx = GET_DATA_INDEX(SLICED_INPUT0, b, h, p, 0); | ||
+ | ||
+ input_idx += SLICED_FROM_START * (b * INPUT0_FEATURE_NUM + h + 1) | ||
+ + SLICED_FROM_END * (b * INPUT0_FEATURE_NUM + h); | ||
+#elif ENABLE_TRANSPOSE | ||
+ uint input_idx = GET_DATA_INDEX(TRANSPOSED_INPUT0, b, h, p, 0); | ||
#else | ||
uint input_idx = INPUT0_GET_INDEX(b, h, p, 0); | ||
-#ifdef ENABLE_SLICE | ||
- input_idx += SLICED_FROM_START; | ||
-#endif | ||
#endif | ||
|
||
uint cos_sin_b = b < INPUT1_BATCH_NUM ? b : 0; |
Oops, something went wrong.