-
Notifications
You must be signed in to change notification settings - Fork 89
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
Allow passing locks to C code. #288
base: main
Are you sure you want to change the base?
Conversation
b8694db
to
51d3d9f
Compare
@@ -10,13 +10,15 @@ | |||
|
|||
#include "kernel.h" | |||
|
|||
void func(int32_t *a, int32_t *b) | |||
void func(int32_t *a, int32_t *b, int64_t lock) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad for the carbon footprint to have 64 bits here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.. this is the main reason why this hasn't been checked in. Today, it's relatively easy to lower from locks to a constant 'index' type in MLIR, but the size of the index type is something 'implementation defined' (by default 64 bits). This really should be cleaner in the lowering to result in something more convenient.
@@ -22,12 +22,12 @@ module @test_chesss_01_precompiled_core_function { | |||
%lock13_3 = AIE.lock(%tile13, 3) { sym_name = "input_lock" } | |||
%lock13_5 = AIE.lock(%tile13, 5) { sym_name = "output_lock" } | |||
|
|||
func.func private @func(%A: memref<256xi32>, %B: memref<256xi32>) -> () | |||
func.func private @func(%A: memref<256xi32>, %B: memref<256xi32>, %lock: index) -> () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps index
could be a more precise type depending on the architecture?
Or at least lowered to a more precise concrete type before calling the real AIE kernel?
To be merged? |
No description provided.