docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
bank_conflicts.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <functional>
5#include <optional>
6#include <vector>
7
10
11namespace sdfg {
12namespace tiles {
13
16struct BankModel {
17 unsigned banks = 32;
18 unsigned bank_bytes = 4;
19};
20
27 const BankModel& model,
28 size_t elem_bytes,
29 const std::vector<int64_t>& strides,
30 const data_flow::SubgroupAccess& access
31);
32
37size_t slot_pad(const BankModel& model, size_t block, size_t coop_span);
38
42size_t row_pad(
43 const BankModel& model,
44 size_t elem_bytes,
45 PackedBuffer buffer,
46 size_t align_bytes,
47 const std::function<std::optional<size_t>(const PackedBuffer&)>& cost
48);
49
50} // namespace tiles
51} // namespace sdfg
The destination side of a tiled copy — the packed local buffer — as a (possibly swizzled) Layout over...
Library node definitions for calling functions beyond simple instructions.
Definition gpu_tile_target.h:13
size_t row_pad(const BankModel &model, size_t elem_bytes, PackedBuffer buffer, size_t align_bytes, const std::function< std::optional< size_t >(const PackedBuffer &)> &cost)
The ConflictPolicy::PadRow padding (elements) of buffer minimizing cost, the access cycles of a candi...
size_t slot_pad(const BankModel &model, size_t block, size_t coop_span)
ConflictPolicy::PadSlot padding (elements) of a per-slot block of block elements whose slots are acce...
size_t access_cycles(const BankModel &model, size_t elem_bytes, const std::vector< int64_t > &strides, const data_flow::SubgroupAccess &access)
Cycles the banked memory spends serving access when the operand's elements (of elem_bytes) sit at ele...
Definition analysis.h:7
The operand elements one subgroup touches in a single access: for every lane, the operand coordinates...
Definition library_node.h:88
A banked on-chip memory: banks banks of bank_bytes each, every bank serving one word per cycle.
Definition bank_conflicts.h:16
unsigned bank_bytes
Definition bank_conflicts.h:18
unsigned banks
Definition bank_conflicts.h:17
The packed local buffer as a value: its nested-array shape (axes), the matching per-axis element addr...
Definition buffer_layout.h:36