Conversation
Implements the first linalg DXIL op including required support for overload name generation. This also adds lowering placeholders so that subsequent DXIL op implementations may be merged in parallel without risk of merge conflict
| } | ||
|
|
||
| StringRef GetHLSLLinAlgMatrixTypeMangling(llvm::StructType *Ty) { | ||
| return Ty->getStructName().substr(sizeof("dx.types.LinAlgMatrix") - 1); |
There was a problem hiding this comment.
sizeof("dx.types.LinAlgMatrix")
TIL!
There was a problem hiding this comment.
haha I figured folks wouldn't like substr(21) very much
damyanp
left a comment
There was a problem hiding this comment.
LGTM, but you'll need an approval from someone more experienced than me.
| void main() { | ||
| // CHECK-LABEL: define void @main() | ||
|
|
||
| // CHECK: %{{.*}} = call %dx.types.LinAlgMatrixC4M5N4U1S2 @dx.op.linAlgFillMatrix.mC4M5N4U1S2.i32(i32 -2147483636, i32 {{.*}}) ; LinAlgFillMatrix(value) |
There was a problem hiding this comment.
what does -2147483636 mean?
There was a problem hiding this comment.
Ahh that's the opcode! 0x80000001 in hex. Its negative because the opcodes are currently experimental
| // expected-no-diagnostics | ||
|
|
||
| [numthreads(1,1,1)] | ||
| void main() { |
There was a problem hiding this comment.
is this test necessary with the codegen test?
There was a problem hiding this comment.
hmm maybe not. Originally this was one big file with code from every builtin but it got split into a bunch of small files to enable parallel PRs
I'm not opposed to removing it, or even merging them all back together into one file at the end.
In general, I'm a big fan of having a straightforward test as a form of "this is how you are supposed to hold it" documentation but in this case we don't want people calling the builtins directly so it doesn't really apply
dx.types.LinAlgMatrixC10M16N16U0S1->mC10M16N16U0S1)Fixes #7895