Skip to content

Commit 1b71c23

Browse files
committed
Missing barrier added to shader.
Number of additional tests reduced to 108.
1 parent 6694ab6 commit 1b71c23

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ggml/src/ggml-vulkan/vulkan-shaders/conv_transpose_1d.comp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const uint32_t bs = gl_WorkGroupSize.x;
2929
uint32_t tid = gl_LocalInvocationID.x;
3030
// Code is more straightforward if we assume it is bs*s0+K instead of (bs-1)*s0+K.
3131
uint32_t tmp_len = bs*p.s0+p.K;
32-
shared D_TYPE tmp[1024];
32+
shared D_TYPE tmp[4096];
3333

3434
uint splitWork(uint workSize){
3535
return (bs + workSize -1) / bs;
@@ -46,6 +46,7 @@ void main(){
4646
uint32_t L_blocks = splitWork(p.L);
4747
for(uint32_t L_block_id = 0; L_block_id < L_blocks; L_block_id++){
4848
if(L_block_id > 0){
49+
barrier();
4950
// Shift values in tmp to the current processing window
5051
for(int i = 0; i < splitWork(tmp_len); i++){
5152
uint32_t idx = i*bs+tid;

tests/test-backend-ops.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4031,8 +4031,8 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
40314031

40324032
for(uint32_t Cout : {1, 9}){
40334033
for(uint32_t Cin : {1, 7}){
4034-
for(uint32_t K : {1, 2, 3, 5, 6, 8, 9, 28}){
4035-
for(uint32_t L : {1, 2, 3, 5, 15, 16, 60, 100, 111, 127, 128, 157, 255, 376, 1024, 1173}){
4034+
for(uint32_t K : {1, 3, 1337}){
4035+
for(uint32_t L : {1, 2, 2173}){
40364036
for(uint32_t s0: {1, 2, 3}){
40374037
test_cases.emplace_back(new test_conv_transpose_1d({L,Cin,1,1}, {K,Cout,Cin,1}, s0, 0, 1));
40384038
}

0 commit comments

Comments
 (0)