Updated tensor to copy to memory explicitly, assessing why copy doesn't last through operations

This commit is contained in:
Alejandro Saucedo 2020-08-22 18:08:56 +01:00
parent 6f0203b863
commit e047aa3b43
10 changed files with 65 additions and 79 deletions

View file

@ -1,21 +1,17 @@
#version 450
layout(binding = 0) buffer tensorLhs {
layout(set = 0, binding = 0) buffer tensorLhs {
uint valuesLhs[ ];
};
layout(binding = 1) buffer tensorRhs {
layout(set = 0, binding = 1) buffer tensorRhs {
uint valuesRhs[ ];
};
layout(binding = 2) buffer tensorOutput {
layout(set = 0, binding = 2) buffer tensorOutput {
uint valuesOutput[ ];
};
layout(binding = 3) buffer tensorInvalid {
uint valuesInvalid[ ];
};
// TODO: Explore how to make layout inside shader dynamic
layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@ -25,10 +21,7 @@ void main()
//valuesOutput[index] = valuesLhs[index] * valuesRhs[index];
// FOR TESTING
valuesOutput[index] = 100 + index;
valuesRhs[index] = 100 + index;
valuesLhs[index] = 100 + index;
valuesInvalid[index] = 100 + index;
valuesOutput[index] = valuesLhs[index] + valuesRhs[index];
}

Binary file not shown.