Skip to main content
vulkan-compute Vulkan compute shader development and pipeline configuration. Generate GLSL/HLSL compute shaders, compile to SPIR-V, configure compute pipelines, manage descriptor sets and resource bindings, implement memory barriers and synchronization.
설치로 이동 Skills Marketplace 커뮤니티가 만든 AI 스킬을 발견하고 탐색하세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/a5c-ai/babysitter --skill vulkan-compute명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Zip 다운로드 다운로드 중... Reference for querying the Atlas knowledge graph through its MCP tools — the SECONDARY enrichment/comparison layer that adds best-practice context to systems you have ALREADY scanned from your real sources (`az`, repos, dirs). Use when you need to look up nodes, edges, kinds, clusters, stats, or wiki pages in Atlas to compare against your real inventory. (atlas graph, query atlas, atlas mcp, search the graph, graph neighbors, atlas record, atlas kinds, enrichment layer)
Atlas turns your STATED NEED into a real systems atlas by SCANNING your actual sources (Azure via `az`, git repos, local dirs) and process/data mining them, THEN enriching against the Atlas knowledge graph. Use this skill when asked to inventory/map your real systems, scan your cloud + repos + directories, mine the real processes or data they contain, or collect their real constraints/gotchas. (atlas, scan my systems, inventory our azure account, map my repos, real systems atlas, process mining, data mining, collect nuances, system discovery)
assimilate-popular-workflows This skill should be used when the user asks to "find skills in the wild", "assimilate popular workflows", "discover SKILL.md files in repos", "research external skills", "find workflow patterns", "survey the skill landscape", "what skills exist out there", or wants to investigate public repositories for extractable processes, babysitter plugins, and reusable procedural insights. Searches GitHub for SKILL.md files, classifies repos by archetype, and maintains structured research under docs/reference-repos/.
name vulkan-compute description Vulkan compute shader development and pipeline configuration. Generate GLSL/HLSL compute shaders, compile to SPIR-V, configure compute pipelines, manage descriptor sets and resource bindings, implement memory barriers and synchronization. allowed-tools Bash(*) Read Write Edit Glob Grep WebFetch metadata {"author":"babysitter-sdk","version":"1.0.0","category":"compute-shaders","backlog-id":"SK-004"} graph {"domains":["domain:scientific-computing"],"specializations":["specialization:gpu-programming"],"skillAreas":["skill-area:cuda-kernels","skill-area:compute-shaders","skill-area:shader-programming"],"roles":["role:computational-scientist","role:ml-engineer"]}
vulkan-compute
You are vulkan-compute - a specialized skill for Vulkan compute shader development and pipeline configuration. This skill provides expert capabilities for GPU compute using the Vulkan API.
Overview
This skill enables AI-powered Vulkan compute operations including:
Generate GLSL/HLSL compute shaders
Compile shaders to SPIR-V bytecode
Configure Vulkan compute pipelines
Manage descriptor sets and resource bindings
Handle push constants and specialization constants
Configure workgroup dimensions and dispatch
Implement memory barriers and synchronization
Support Vulkan validation layers for debugging
Prerequisites
Vulkan SDK 1.3+
glslangValidator or glslc (SPIR-V compiler)
SPIRV-Tools (optional)
Vulkan-capable GPU
Capabilities
1. GLSL Compute Shader Generation Generate GLSL compute shaders:
#version 450
// Workgroup size specification
layout(local_size_x = 256, local_size_y = 1, local_size_z = 1) in;
// Buffer bindings
layout(set = 0, binding = 0) readonly buffer InputBuffer {
float inputData[];
};
layout(set = 0, binding = 1) writeonly buffer OutputBuffer {
float outputData[];
};
// Push constants for runtime parameters
layout(push_constant) uniform PushConstants {
uint dataSize;
float multiplier;
} pc;
void main() {
uint gid = gl_GlobalInvocationID.x;
if (gid < pc.dataSize) {
outputData[gid] = inputData[gid] * pc.multiplier;
}
}
2. SPIR-V Compilation Compile shaders to SPIR-V:
glslangValidator -V compute.glsl -o compute.spv
glslc -fshader-stage=compute compute.glsl -o compute.spv
glslc -O compute.glsl -o compute.spv
spirv-dis compute.spv -o compute.spvasm
spirv-val compute.spv
spirv-opt -O compute.spv -o compute_opt.spv
3. Compute Pipeline Creation Create Vulkan compute pipelines:
VkShaderModuleCreateInfo shaderInfo = {
.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,
.codeSize = spirvSize,
.pCode = spirvCode
};
VkShaderModule shaderModule;
vkCreateShaderModule(device, &shaderInfo, NULL , &shaderModule);
VkPushConstantRange pushConstantRange = {
.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT,
.offset = 0 ,
.size = sizeof (PushConstants)
};
VkPipelineLayoutCreateInfo layoutInfo = {
.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
.setLayoutCount = 1 ,
.pSetLayouts = &descriptorSetLayout,
.pushConstantRangeCount = 1 ,
.pPushConstantRanges = &pushConstantRange
};
VkPipelineLayout pipelineLayout;
vkCreatePipelineLayout(device, &layoutInfo, NULL , &pipelineLayout);
VkComputePipelineCreateInfo pipelineInfo = {
.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO,
.stage = {
.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
.stage = VK_SHADER_STAGE_COMPUTE_BIT,
.module = shaderModule,
.pName = "main"
},
.layout = pipelineLayout
};
VkPipeline computePipeline;
vkCreateComputePipelines(device, VK_NULL_HANDLE, 1 , &pipelineInfo, NULL , &computePipeline);
4. Descriptor Set Management Configure resource bindings:
VkDescriptorSetLayoutBinding bindings[] = {
{
.binding = 0 ,
.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
.descriptorCount = 1 ,
.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT
},
{
.binding = 1 ,
.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
.descriptorCount = 1 ,
.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT
}
};
VkDescriptorSetLayoutCreateInfo layoutInfo = {
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,
.bindingCount = 2 ,
.pBindings = bindings
};
VkDescriptorSetLayout descriptorSetLayout;
vkCreateDescriptorSetLayout(device, &layoutInfo, NULL , &descriptorSetLayout);
VkDescriptorBufferInfo inputBufferInfo = {
.buffer = inputBuffer,
.offset = 0 ,
.range = VK_WHOLE_SIZE
};
VkDescriptorBufferInfo outputBufferInfo = {
.buffer = outputBuffer,
.offset = 0 ,
.range = VK_WHOLE_SIZE
};
VkWriteDescriptorSet writes[] = {
{
.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
.dstSet = descriptorSet,
.dstBinding = 0 ,
.descriptorCount = 1 ,
.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
.pBufferInfo = &inputBufferInfo
},
{
.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
.dstSet = descriptorSet,
.dstBinding = 1 ,
.descriptorCount = 1 ,
.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
.pBufferInfo = &outputBufferInfo
}
};
vkUpdateDescriptorSets(device, 2 , writes, 0 , NULL );
5. Specialization Constants Runtime shader customization:
// In shader
layout(constant_id = 0) const uint WORKGROUP_SIZE = 256;
layout(constant_id = 1) const bool USE_FAST_MATH = false;
layout(local_size_x_id = 0) in;
VkSpecializationMapEntry entries[] = {
{0 , 0 , sizeof (uint32_t )},
{1 , sizeof (uint32_t ), sizeof (VkBool32)}
};
struct {
uint32_t workgroupSize;
VkBool32 useFastMath;
} specData = {512 , VK_TRUE};
VkSpecializationInfo specInfo = {
.mapEntryCount = 2 ,
.pMapEntries = entries,
.dataSize = sizeof (specData),
.pData = &specData
};
pipelineInfo.stage.pSpecializationInfo = &specInfo;
6. Compute Dispatch
vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE, computePipeline);
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE,
pipelineLayout, 0 , 1 , &descriptorSet, 0 , NULL );
vkCmdPushConstants(commandBuffer, pipelineLayout, VK_SHADER_STAGE_COMPUTE_BIT,
0 , sizeof (PushConstants), &pushConstants);
uint32_t groupCountX = (dataSize + 255 ) / 256 ;
vkCmdDispatch(commandBuffer, groupCountX, 1 , 1 );
vkCmdDispatchIndirect(commandBuffer, indirectBuffer, 0 );
7. Memory Barriers and Synchronization
VkBufferMemoryBarrier barrier = {
.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER,
.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT,
.dstAccessMask = VK_ACCESS_SHADER_READ_BIT,
.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
.buffer = buffer,
.offset = 0 ,
.size = VK_WHOLE_SIZE
};
vkCmdPipelineBarrier(commandBuffer,
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
0 , 0 , NULL , 1 , &barrier, 0 , NULL );
VkMemoryBarrier memoryBarrier = {
.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER,
.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT,
.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT
};
vkCmdPipelineBarrier(commandBuffer,
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
VK_PIPELINE_STAGE_TRANSFER_BIT,
0 , 1 , &memoryBarrier, 0 , NULL , 0 , NULL );
8. Validation Layers
const char * validationLayers[] = {
"VK_LAYER_KHRONOS_validation"
};
VkInstanceCreateInfo createInfo = {
.enabledLayerCount = 1 ,
.ppEnabledLayerNames = validationLayers
};
VkDebugUtilsMessengerCreateInfoEXT debugInfo = {
.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT,
.messageSeverity = VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT |
VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT,
.messageType = VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT |
VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT,
.pfnUserCallback = debugCallback
};
Process Integration This skill integrates with the following processes:
compute-shader-development.js - Compute shader workflows
Output Format {
"operation" : "compile-shader" ,
"status" : "success" ,
"input" : "compute.glsl" ,
"output" : "compute.spv" ,
"spirv_size" : 1024 ,
"workgroup_size" : [ 256 , 1 , 1 ] ,
"bindings" : [
{ "binding" : 0 , "type" : "storage_buffer" , "access" : "readonly" } ,
{ "binding" : 1 , "type" : "storage_buffer" , "access" : "writeonly" }
] ,
"push_constants_size" : 8 ,
"artifacts" : [ "compute.spv" , "compute.spvasm" ]
}
Dependencies
Vulkan SDK 1.3+
glslangValidator or glslc
SPIRV-Tools (optional)
Constraints
Workgroup size limited by device (usually 1024 threads)
Descriptor set count limited (usually 4)
Push constant size limited (128+ bytes)
SPIR-V version must match Vulkan version