vulkan: Workaround compiler bug in conv2d coopmat2 path (#24924)
* vulkan: Workaround compiler bug in conv2d coopmat2 path * apply same workaround to CONV_3D * Apply suggestion from @jeffbolznv
This commit is contained in:
@@ -158,7 +158,7 @@ const uint32_t Csh_stride = BS_NPQ;
|
|||||||
#ifdef COOPMAT
|
#ifdef COOPMAT
|
||||||
const uint32_t Csh_len = BS_K * Csh_stride;
|
const uint32_t Csh_len = BS_K * Csh_stride;
|
||||||
#else
|
#else
|
||||||
const uint32_t Csh_len = csh_store != 0 ? BS_K * Csh_stride : 1;
|
const uint32_t Csh_len = csh_store != 0 ? BS_K * Csh_stride : 8; // 8 to workaround compiler bug
|
||||||
#endif
|
#endif
|
||||||
shared SHMEM_TYPE Csh[Csh_len]; // K x NPQ
|
shared SHMEM_TYPE Csh[Csh_len]; // K x NPQ
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ const uint32_t Csh_stride = BS_NPQ;
|
|||||||
#ifdef COOPMAT
|
#ifdef COOPMAT
|
||||||
const uint32_t Csh_len = BS_K * Csh_stride;
|
const uint32_t Csh_len = BS_K * Csh_stride;
|
||||||
#else
|
#else
|
||||||
const uint32_t Csh_len = csh_store != 0 ? BS_K * Csh_stride : 1;
|
const uint32_t Csh_len = csh_store != 0 ? BS_K * Csh_stride : 8; // 8 to workaround compiler bug
|
||||||
#endif
|
#endif
|
||||||
shared SHMEM_TYPE Csh[Csh_len]; // K x NPQ
|
shared SHMEM_TYPE Csh[Csh_len]; // K x NPQ
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -7973,6 +7973,9 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (auto kernel_type : {GGML_TYPE_F32, GGML_TYPE_F16}) {
|
||||||
|
test_cases.emplace_back(new test_conv_2d({ 256, 256, 192, 1 }, { 3, 3, 192, 96 }, kernel_type, 1, 1, 1, 1, 1, 1, false));
|
||||||
|
}
|
||||||
|
|
||||||
// sycl backend will limit task global_range < MAX_INT
|
// sycl backend will limit task global_range < MAX_INT
|
||||||
// test cases for 2D im2col with large input W and H (occurs in stable-diffusion)
|
// test cases for 2D im2col with large input W and H (occurs in stable-diffusion)
|
||||||
|
|||||||
Reference in New Issue
Block a user