-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[mlir][spirv] Use verifySymbolUses
for spirv.FunctionCall
.
#159399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
aed3836
bc34970
f0917d9
2ab414f
8c6d4c8
448179a
fe18af2
efb4f3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -262,6 +262,35 @@ spirv.module Logical GLSL450 { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// ----- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"builtin.module"() ({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"spirv.module"() <{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
addressing_model = #spirv.addressing_model<Logical>, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
memory_model = #spirv.memory_model<GLSL450> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}> ({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"spirv.func"() <{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
function_control = #spirv.function_control<None>, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
function_type = (f32) -> f32, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sym_name = "bar" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}> ({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
^bb0(%arg0: f32): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
%0 = "spirv.FunctionCall"(%arg0) <{callee = @foo}> : (f32) -> f32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"spirv.ReturnValue"(%0) : (f32) -> () | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}) : () -> () | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// expected-error @+1 {{requires attribute 'function_type'}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"spirv.func"() <{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
function_control = #spirv.function_control<None>, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
message = "2nd parent", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sym_name = "foo" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// This is invalid MLIR because function_type is missing from spirv.func | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
amd-eochoalo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}> ({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
^bb0(%arg0: f32): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"spirv.ReturnValue"(%arg0) : (f32) -> () | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}) : () -> () | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}) : () -> () | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}) : () -> () | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// ----- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think removing this test is also reasonable. Happy to make this change if reviewers agree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kuhar, can I interpret your thumbs up as "remove this test"? (Got confused by your correction to the comment inside this test.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will merge then but happy to delete this test in another PR. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//===----------------------------------------------------------------------===// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// spirv.mlir.loop | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//===----------------------------------------------------------------------===// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.