Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
vulkanpeak
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ResearchAndDevelopment
vulkanpeak
Merge requests
!1
Working example
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Open
Working example
add_skeleton
into
main
Overview
0
Commits
6
Pipelines
0
Changes
5
Open
Mattia Mancini
requested to merge
add_skeleton
into
main
10 months ago
Overview
0
Commits
6
Pipelines
0
Changes
5
Expand
0
0
Merge request reports
Compare
main
version 5
52753ad0
10 months ago
version 4
44c1d793
10 months ago
version 3
189cbed3
10 months ago
version 2
529827d8
10 months ago
version 1
9f0daf04
10 months ago
main (HEAD)
and
latest version
latest version
d45c0180
6 commits,
10 months ago
version 5
52753ad0
5 commits,
10 months ago
version 4
44c1d793
4 commits,
10 months ago
version 3
189cbed3
3 commits,
10 months ago
version 2
529827d8
2 commits,
10 months ago
version 1
9f0daf04
1 commit,
10 months ago
5 files
+
70
−
32
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
shaders/fp32.comp
+
25
−
14
Options
#version 450
#version 450
layout(local_size_x = 1) in;
layout(local_size_x = 1
024
) in;
// The input-output tensors bind index is relative to index in parameter passed
// The input-output tensors bind index is relative to index in parameter passed
layout(set = 0, binding = 0) buffer buffer_in_data {
layout(set = 0, binding = 0) buffer buffer_in_data {float data[];};
float data[];
};
void main() {
vec2 fp32_8(vec2 a, vec2 b, vec2 c) {
uint index = gl_GlobalInvocationID.x;
vec2 result = {0.f, 0.f};
// Iterating to simulate longer process
for(int i = 0; i < 2048; i ++) {
for(int i = 0;
result.x = fma(a.x, b.x, c.x);
i < 2048;
result.x = fma(-a.y, b.y, result.x);
i ++) {
result.y = fma(a.x, b.y, result.x);
fma(data[index], data[index], data[index]);
result.y = fma(a.y, b.x, result.y);
fma(data[index], - data[index], data[index]);
}
fma(data[index], data[index], - data[index]);
return result;
fma(data[index], data[index], data[index]);
}
}
void main() {
uint index = gl_GlobalInvocationID.x;
// Iterating to simulate longer process
vec2 a = { data[index], data[index + 1] };
vec2 b = { 1.f, 2.f };
vec2 c = { 3.f, 4.f };
vec2 d = {0.f, 0.f};
for(int i = 0; i < 2048; i ++) {
d = d+ fp32_8(a, b, c);
}
data[index] = d.x + d.y;
}
}
Loading