XeTLA v0.3.6
IntelĀ® Xe Templates for Linear Algebra - API Definition Document
 
Loading...
Searching...
No Matches
arch_config.hpp
Go to the documentation of this file.
1/*******************************************************************************
2* Copyright (c) 2022-2023 Intel Corporation
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*******************************************************************************/
16
19
20#pragma once
21
23
24namespace gpu::xetla {
25
28
29template <msg_type message_type, gpu_arch arch_tag>
31template <>
34 static constexpr uint32_t max_load_height_in_elem = 32;
35 static constexpr uint32_t max_load_width_in_bytes = 64;
36 static constexpr uint32_t max_trans_load_width_in_bytes = 32;
37 static constexpr uint32_t max_vnni_load_width_in_elems = 16;
38 static constexpr uint32_t min_vnni_load_height_in_bytes = 4;
39
40 static constexpr uint32_t max_store_height_in_elem = 8;
41 static constexpr uint32_t max_store_width_in_bytes = 64;
42
43 static constexpr uint32_t max_load_size_in_bytes = 2048;
44 static constexpr uint32_t max_store_size_in_bytes = 512;
45
46 static constexpr uint32_t special_prefetch_width_in_bytes = 64;
47
48 static constexpr uint32_t cache_line_size_in_bytes = 64;
49 static constexpr uint32_t alignment_in_bytes = 8;
50};
51
52template <gpu_arch arch_tag>
53struct mma_attr_t {};
54template <>
56 static constexpr uint32_t mma_m_in_elem = 8;
57 static constexpr uint32_t mma_n_in_elem = 16;
58 static constexpr uint32_t mma_k_in_bytes = 32;
59};
60
61template <grf_mode grf_num_mode, gpu_arch arch_tag>
63template <grf_mode grf_num_mode>
64struct register_attr_t<grf_num_mode, gpu_arch::Xe> {
65 static constexpr uint32_t acc_reg_in_bytes
66 = (grf_num_mode == grf_mode::normal) ? 4 * 64 : 8 * 64;
67 static constexpr uint32_t grf_in_bytes
68 = (grf_num_mode == grf_mode::normal) ? 128 * 64 : 256 * 64;
69 static constexpr uint32_t reg_in_bytes = 64;
70};
71template <gpu_arch arch_tag>
72struct arch_attr_t {};
73template <>
75 template <msg_type message_type = msg_type::block_2d>
77
78 template <grf_mode grf_num_mode = grf_mode::double_grf>
80
82
83 static constexpr uint32_t max_wg_num = 64;
84};
85
87
88} // namespace gpu::xetla
C++ API.
Definition arch_config.hpp:24
gpu_arch
Definition common.hpp:73
msg_type
Definition common.hpp:78
Definition arch_config.hpp:72
Definition arch_config.hpp:30
Definition arch_config.hpp:55
Definition arch_config.hpp:53
Definition arch_config.hpp:62