Skip to content

Commit bf7352e

Browse files
committed
vulkan: adjusted subgroup size map
1 parent 29e8104 commit bf7352e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

ggml/src/ggml-vulkan/ggml-vulkan.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,17 +1520,18 @@ struct GpuPipelineConfig {
15201520
uint32_t default_subgroup_size = 0;
15211521
};
15221522

1523-
// Common pipeline configuration for RDNA GPUs.
1524-
static const std::unordered_map<std::string, uint32_t> rdna_common_pipelines = {
1523+
// Pipeline configuration for RDNA1 GPUs.
1524+
static const std::unordered_map<std::string, uint32_t> rdna1_pipelines = {
15251525
{"soft_max", 64}, {"im2col", 64},
1526-
};
1527-
1528-
// RDNA1 pipeline configuration.
1529-
static std::unordered_map<std::string, uint32_t> rdna1_pipelines = rdna_common_pipelines;
1530-
static const bool rdna1_initialized = (rdna1_pipelines.insert({
15311526
{"argmax", 64}, {"mul_mat_vec", 64},
15321527
{"mul_mat_vec_f16", 32}, {"mul_mat_vec_f32_f16", 32}
1533-
}), true);
1528+
};
1529+
1530+
// Pipeline configuration for RDNA2 GPUs.
1531+
static const std::unordered_map<std::string, uint32_t> rdna2_pipelines = {
1532+
{"soft_max", 64}, {"im2col", 64},
1533+
{"argmax", 64},
1534+
};
15341535

15351536
static constexpr uint32_t RDNA_DEFAULT_SUBGROUP_SIZE = 32;
15361537

@@ -1546,7 +1547,7 @@ static std::vector<GpuPipelineConfig> gpu_pipeline_configs = {
15461547
{
15471548
vk_device_architecture::AMD_RDNA2,
15481549
{
1549-
rdna_common_pipelines,
1550+
rdna2_pipelines,
15501551
},
15511552
RDNA_DEFAULT_SUBGROUP_SIZE
15521553
},

0 commit comments

Comments
 (0)