Skip to content

Commit d680ff1

Browse files
committed
switch to final directories and sample names
1 parent 9988e6d commit d680ff1

File tree

16 files changed

+80
-31
lines changed

16 files changed

+80
-31
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2024-2025 Ben Ashbaugh
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
add_opencl_sample(
6+
TEST
7+
NUMBER 20
8+
TARGET matrixexperiments-bf16
9+
VERSION 200 # for clSetKernelExecInfo
10+
SOURCES main.cpp
11+
KERNELS matrix_helpers_bf16.cl matrix_kernels_bf16.cl matrix_kernel_tiled_bf16.cl)

samples/99_matrixexperiments/main.cpp renamed to samples/20_matrixexperiments-bf16/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
// Copyright (c) 2019-2024 Ben Ashbaugh
2+
// Copyright (c) 2024-2025 Ben Ashbaugh
33
//
44
// SPDX-License-Identifier: MIT
55
*/
@@ -662,7 +662,7 @@ int main(int argc, char** argv)
662662
int platformIndex = 0;
663663
int deviceIndex = 0;
664664

665-
std::string fileName("matrix_kernels.cl");
665+
std::string fileName("matrix_kernels_bf16.cl");
666666
std::string buildOptions;
667667
size_t matrixSize = 512;
668668

samples/99_matrixexperiments/matrix_helpers.cl renamed to samples/20_matrixexperiments-bf16/matrix_helpers_bf16.cl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
// Copyright (c) 2024-2025 Ben Ashbaugh
3+
//
4+
// SPDX-License-Identifier: MIT
5+
*/
6+
17
float bf16_to_fp32(ushort u)
28
{
39
#if defined(cl_intel_bfloat16_conversions)

samples/99_matrixexperiments/matrix_kernel_tiled.cl renamed to samples/20_matrixexperiments-bf16/matrix_kernel_tiled_bf16.cl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
// Copyright (c) 2024-2025 Ben Ashbaugh
3+
//
4+
// SPDX-License-Identifier: MIT
5+
*/
6+
17
#if !defined(tK)
28
#error "tK is undefined! This should be defined as the K dimension of the matrix tiles, which is dependent on the elemement type, likely 16 or 32."
39
#endif

samples/99_matrixexperiments/matrix_kernels.cl renamed to samples/20_matrixexperiments-bf16/matrix_kernels_bf16.cl

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
#include "matrix_helpers.cl"
1+
/*
2+
// Copyright (c) 2024-2025 Ben Ashbaugh
3+
//
4+
// SPDX-License-Identifier: MIT
5+
*/
6+
7+
#include "matrix_helpers_bf16.cl"
28

39
#if EMULATE_tN8
410
#define mat_mul_sg8 emu_sub_group_bf16_bf16_matrix_mad_k16
@@ -580,43 +586,43 @@ kernel void bfloat16_dpas_blockread_vnni_m8_n16(global float* C, global ushort*
580586

581587
#define MM 1
582588
#define NN 1
583-
#include "matrix_kernel_tiled.cl"
589+
#include "matrix_kernel_tiled_bf16.cl"
584590
#undef MM
585591
#undef NN
586592

587593
#define MM 2
588594
#define NN 1
589-
#include "matrix_kernel_tiled.cl"
595+
#include "matrix_kernel_tiled_bf16.cl"
590596
#undef MM
591597
#undef NN
592598

593599
#define MM 1
594600
#define NN 2
595-
#include "matrix_kernel_tiled.cl"
601+
#include "matrix_kernel_tiled_bf16.cl"
596602
#undef MM
597603
#undef NN
598604

599605
#define MM 2
600606
#define NN 2
601-
#include "matrix_kernel_tiled.cl"
607+
#include "matrix_kernel_tiled_bf16.cl"
602608
#undef MM
603609
#undef NN
604610

605611
#define MM 4
606612
#define NN 2
607-
#include "matrix_kernel_tiled.cl"
613+
#include "matrix_kernel_tiled_bf16.cl"
608614
#undef MM
609615
#undef NN
610616

611617
#define MM 2
612618
#define NN 4
613-
#include "matrix_kernel_tiled.cl"
619+
#include "matrix_kernel_tiled_bf16.cl"
614620
#undef MM
615621
#undef NN
616622

617623
#define MM 4
618624
#define NN 4
619-
#include "matrix_kernel_tiled.cl"
625+
#include "matrix_kernel_tiled_bf16.cl"
620626
#undef MM
621627
#undef NN
622628

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Copyright (c) 2019-2024 Ben Ashbaugh
1+
# Copyright (c) 2024-2025 Ben Ashbaugh
22
#
33
# SPDX-License-Identifier: MIT
44

55
add_opencl_sample(
66
TEST
7-
NUMBER 99
8-
TARGET matrixexperimentsi8
7+
NUMBER 20
8+
TARGET matrixexperiments-i8
99
VERSION 200 # for clSetKernelExecInfo
1010
SOURCES main.cpp
1111
KERNELS matrix_helpers_i8.cl matrix_kernels_i8.cl)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
// Copyright (c) 2019-2024 Ben Ashbaugh
2+
// Copyright (c) 2024-2025 Ben Ashbaugh
33
//
44
// SPDX-License-Identifier: MIT
55
*/

samples/99_matrixexperimentsi8/matrix_helpers_i8.cl renamed to samples/20_matrixexperiments-i8/matrix_helpers_i8.cl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
// Copyright (c) 2024-2025 Ben Ashbaugh
3+
//
4+
// SPDX-License-Identifier: MIT
5+
*/
6+
17
__attribute__((overloadable))
28
int activation(int i)
39
{

samples/99_matrixexperimentsi8/matrix_kernels_i8.cl renamed to samples/20_matrixexperiments-i8/matrix_kernels_i8.cl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
// Copyright (c) 2024-2025 Ben Ashbaugh
3+
//
4+
// SPDX-License-Identifier: MIT
5+
*/
6+
17
#include "matrix_helpers_i8.cl"
28

39
#if EMULATE_tN8
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Copyright (c) 2019-2024 Ben Ashbaugh
1+
# Copyright (c) 2024-2025 Ben Ashbaugh
22
#
33
# SPDX-License-Identifier: MIT
44

55
add_opencl_sample(
66
TEST
7-
NUMBER 99
8-
TARGET matrixexperimentstf32
7+
NUMBER 20
8+
TARGET matrixexperiments-tf32
99
VERSION 200 # for clSetKernelExecInfo
1010
SOURCES main.cpp
1111
KERNELS matrix_helpers_tf32.cl matrix_kernels_tf32.cl matrix_kernel_tiled_tf32.cl)

0 commit comments

Comments
 (0)