Skip to content

Commit

Permalink
local group size adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhylkaaa committed May 19, 2020
1 parent 2239650 commit 39616fc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion shaders/d_dense_b.comp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#version 450

layout (local_size_x = 32, local_size_y = 1, local_size_z = 1) in;
layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in;

layout(std430, binding=5) buffer outdb { float d_bias[]; };
layout(std430, binding=6) buffer readonly indO { float layer_doutput[]; };
Expand Down
2 changes: 1 addition & 1 deletion shaders/softmax.comp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#version 450

layout (local_size_x = 32, local_size_y = 1, local_size_z = 1) in;
layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in;

layout(std430, binding=0) buffer inI { float layer_input[]; };
layout(std430, binding=1) buffer outO { float layer_output[]; };
Expand Down
2 changes: 1 addition & 1 deletion src/dense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void DenseLayer::backward_initialize(VkBuffer &d_out) {
backwardWeightPipeline,backwardDescriptorSet, (dim.inp_dim+15)/16, (dim.output_dim+15)/16, 1);

recordComputePipeline(backwardBiasCommandBuffer, backwardPipelineLayout, sizeof(dims), reinterpret_cast<void*>(&dim),
backwardBiasPipeline,backwardDescriptorSet, (dim.output_dim+31)/32, 1, 1);
backwardBiasPipeline,backwardDescriptorSet, (dim.output_dim+63)/64, 1, 1);
backward_initialized = true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/softmax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void SoftmaxLayer::forward_initialize(VkQueue &queue) {
createCommandPoolAndBuffer(device, queueFamilyIndex, forwardCommandPool, forwardCommandBuffer);

recordComputePipeline(forwardCommandBuffer, forwardPipelineLayout, sizeof(dims), reinterpret_cast<void*>(&dim),
forwardPipeline,forwardDescriptorSet, (dim.batch_size+31)/32, 1, 1);
forwardPipeline,forwardDescriptorSet, (dim.batch_size+63)/64, 1, 1);

}

Expand Down

0 comments on commit 39616fc

Please sign in to comment.