-
Notifications
You must be signed in to change notification settings - Fork 13
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
Error when doing make run-clockwork on new max pooling example #97
Comments
Let me take a look (although I think Jeff might be of more help with this error) |
Hmm. I'm getting a different error. Are |
I've seen several different errors depending on the order in which I call the make commands. Yes I see The other error I sometimes get is: [INFO] Module.compile(): clockwork_source_name = ./bin/maxpool_clockwork.cpp
creating file from name: maxpool
[INFO] Module.compile(): clockwork header file = ./bin/maxpool.h
creating file from name: maxpool
outputting clockwork target named maxpool
Error at ../../../../distrib/tools/GenGen.cpp:4:
Can't represent an integer with this many bits in C: (void *)
../../hw_support/hardware_targets.mk:132: recipe for target 'bin/maxpool_memory.cpp' failed
make: *** [bin/maxpool_memory.cpp] Aborted (core dumped)
make: *** Deleting file 'bin/maxpool_memory.cpp' What error are you seeing? |
Ah! that's the error I'm getting. I'm tracing it now |
I just pushed a temporary fix to this |
@thenextged trying now. |
@jeffsetter The |
For now, I went back to using the name |
@thenextged is there an issue with the way the app itself is written that I could fix? Or is the problem in code generation? |
@thenextged just finished running and comparing max pool and they |
Great! I think the app's Halide code is fine. The codegen fix shouldn't be too bad (I'll let Jeff comment on that) |
To adjust the loops, you can use Patch that evaluates correctly is: index e2238b484..390c303db 100644
--- a/apps/hardware_benchmarks/apps/max_pool_2x2/maxpool_generator.cpp
+++ b/apps/hardware_benchmarks/apps/max_pool_2x2/maxpool_generator.cpp
@@ -77,6 +77,7 @@ public:
hw_output
.tile(x, y, xo, yo, xi, yi, imgSize, imgSize)
+ .reorder(xi, yi, c, xo, yo)
.hw_accelerate(xi, xo);
pooled.compute_at(hw_output, xo);
diff --git a/src/CodeGen_RDAI.cpp b/src/CodeGen_RDAI.cpp
index f102879e5..b7e658b66 100644
--- a/src/CodeGen_RDAI.cpp
+++ b/src/CodeGen_RDAI.cpp
@@ -163,7 +163,8 @@ void CodeGen_RDAI::visit(const Call *op) {
}
void CodeGen_RDAI::visit(const ProducerConsumer *op) {
- string target_prefix = "hw_output";
+ //string target_prefix = "hw_output";
+ string target_prefix = "_hls_target";
if(starts_with(op->name, target_prefix) && op->is_producer) {
Stmt hw_body = substitute_in_all_letstmts(op->body); |
@jeffsetter both of these loop nests should be valid |
Yea I think both loop nests should be allowed. If you want to have all of the loops done on the accelerator you can include However, I'm not sure why all of those loops need to be in the accelerator. Is there some assumption in that loops can't be outside the |
Yeah the issue is I'm not supporting scalar variables as accelerator function parameters yet (which we will need in this case to pass the current value of |
Or as an alternative, I can emit crops/slices and rewrite the IR to collapse the external dimensions. This way we only keep buffer arguments. Also, I want to make sure that the strategy I choose here is compatible with your target generator |
@jeffsetter @thenextged I've gotten the CPU code compiling and running for my max-pooling example (https://github.com/StanfordAHA/Halide-to-Hardware/tree/maxpool_example/apps/hardware_benchmarks/apps/max_pool_2x2), but when I run
make run-clockwork
I get the following error:Any idea what is going on here? Thanks!
The text was updated successfully, but these errors were encountered: