-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VLCLJ-2113 - Add test for timestamp IPC events
Signed-off-by: Jemale Lockett <jemale.lockett@intel.com>
- Loading branch information
Showing
6 changed files
with
334 additions
and
10 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
40 changes: 40 additions & 0 deletions
40
conformance_tests/core/test_ipc/kernels/ze_matrix_multiplication_ipc.cl
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,40 @@ | ||
/* | ||
* | ||
* Copyright (c) 2023 Intel Corporation | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
*/ | ||
|
||
// Matrix A has M rows and K columns | ||
// Matrix B has K rows and N columns | ||
// Matrix C has M rows and N columns | ||
|
||
#define TILE_SIZE 16 | ||
__attribute__((reqd_work_group_size(TILE_SIZE, TILE_SIZE, 1))) kernel void | ||
matrix_multiplication(const global float *a, const global float *b, | ||
const int m, const int k, const int n, | ||
global float *c) { | ||
const int2 global_id = {get_global_id(0), get_global_id(1)}; | ||
const int2 local_id = {get_local_id(0), get_local_id(1)}; | ||
|
||
local float a_tile[TILE_SIZE * TILE_SIZE]; | ||
local float b_tile[TILE_SIZE * TILE_SIZE]; | ||
|
||
float sum = 0.0f; | ||
for (int tile_id = 0; tile_id < k / TILE_SIZE; ++tile_id) { | ||
a_tile[local_id.y * TILE_SIZE + local_id.x] = | ||
a[(tile_id * TILE_SIZE + local_id.y) * m + global_id.x]; | ||
b_tile[local_id.y * TILE_SIZE + local_id.x] = | ||
b[global_id.y * k + (tile_id * TILE_SIZE + local_id.x)]; | ||
barrier(CLK_LOCAL_MEM_FENCE); | ||
|
||
for (int i = 0; i < TILE_SIZE; ++i) { | ||
sum += a_tile[i * TILE_SIZE + local_id.x] * | ||
b_tile[local_id.y * TILE_SIZE + i]; | ||
} | ||
barrier(CLK_LOCAL_MEM_FENCE); | ||
} | ||
|
||
c[global_id.y * m + global_id.x] = sum; | ||
} |
Binary file added
BIN
+3.91 KB
conformance_tests/core/test_ipc/kernels/ze_matrix_multiplication_ipc.spv
Binary file not shown.
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
Oops, something went wrong.