-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: launching setup kernels from main
- Loading branch information
Showing
8 changed files
with
159 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule talvos
updated
4 files
+22 −0 | include/talvos/PipelineExecutor.h | |
+29 −3 | lib/talvos/Invocation.cpp | |
+19 −2 | lib/talvos/PipelineExecutor.cpp | |
+2 −0 | lib/talvos/PipelineStage.cpp |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { describe, expect, test } from 'vitest'; | ||
import talvos from './talvos-wasm'; | ||
// TODO: replace ? | ||
import fill from '../content/talvos/fill.spvasm.?raw' | ||
import dup from './testdata/dup_entry.spvasm?raw' | ||
|
||
// fixme: these tests are descriptive, not normative (they're bad feedback) | ||
describe('talvos FIXMEs', () => { | ||
test('oob_write', async () => { | ||
let [stdout, stderr] = ['', '']; | ||
let instance = await talvos({ | ||
print: (text: any) => { stdout += text + "\n"; }, | ||
printErr: (text: any) => { stderr += text + "\n"; /*console.error(text)*/ }, | ||
}); | ||
|
||
|
||
instance.cwrap('test_entry', 'void', ['string', 'string', 'string'])( | ||
fill, | ||
'FILL', | ||
` | ||
BUFFER a 64 UNINIT | ||
DESCRIPTOR_SET 0 0 0 a | ||
DISPATCH 17 1 1 | ||
` | ||
) | ||
|
||
expect(stdout).to.be.empty; | ||
expect(stderr).toMatchInlineSnapshot(` | ||
" | ||
Invalid store of 4 bytes to address 0x1000000000040 (Device scope) | ||
Entry point: %1 FILL | ||
Invocation: Global(16,0,0) Local(0,0,0) Group(16,0,0) | ||
OpStore %18 %14 | ||
" | ||
`); | ||
}) | ||
test('duplicate EntryPoint', async () => { | ||
let [stdout, stderr] = ['', '']; | ||
let instance = await talvos({ | ||
print: (text: any) => { stdout += text + "\n"; }, | ||
printErr: (text: any) => { stderr += text + "\n"; /*console.error(text)*/ }, | ||
}); | ||
|
||
|
||
instance.cwrap('test_entry', 'void', ['string', 'string', 'string'])( | ||
dup, | ||
'main', | ||
`DISPATCH 1 1 1`, | ||
) | ||
expect(stdout).to.be.empty; | ||
expect(stderr).toMatchInlineSnapshot(` | ||
"line 1: ERROR: Bad EntryPoint! | ||
" | ||
`) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
; SPIR-V | ||
; Version: 1.3 | ||
OpCapability Shader | ||
OpMemoryModel Logical GLSL450 | ||
OpEntryPoint GLCompute %main_fn "main" | ||
OpEntryPoint GLCompute %main_fn "main2" | ||
|
||
; types | ||
%void_t = OpTypeVoid | ||
%void_fn_t = OpTypeFunction %void_t | ||
|
||
; main entry point | ||
%main_fn = OpFunction %void_t None %void_fn_t | ||
%0 = OpLabel | ||
OpReturn | ||
OpFunctionEnd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters