Skip to content
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

Halide AutoSchedule Error #7670

Closed
Gager-Git-life opened this issue Jul 6, 2023 · 2 comments · Fixed by #7673
Closed

Halide AutoSchedule Error #7670

Gager-Git-life opened this issue Jul 6, 2023 · 2 comments · Fixed by #7673

Comments

@Gager-Git-life
Copy link

How to use autoscheduler in the latest version of halide?

##I modified the code in the auto_schedule section of app/onnx/model.cpp by referring to the halide documentation
std::string auto_schedule(const HalideModel &pipeline) { // Generate a schedule for the pipeline. Halide::Target tgt = Halide::get_host_target(); // auto schedule = pipeline.rep->auto_schedule(tgt); Halide::AutoschedulerParams autoscheduler_params = Halide::AutoschedulerParams("Adams2019"); auto schedule = pipeline.rep->apply_autoscheduler(tgt, autoscheduler_params); return schedule.schedule_source; }

##When I compile and test, the following error occurs
`PYTHONPATH="bin/host/:$PYTHONPATH" python3 -m unittest model_test.py -v
test_empty_model (model_test.ModelTest) ... ok
test_model_with_initializer (model_test.ModelTest) ... ok
test_scalars (model_test.ModelTest) ... ERROR
test_small_model (model_test.ModelTest) ... ERROR
test_tensors_rank_zero (model_test.ModelTest) ... ok

======================================================================
ERROR: test_scalars (model_test.ModelTest)

Traceback (most recent call last):
File "/home/gager/Halide/apps/onnx/model_test.py", line 64, in test_scalars
schedule = model.OptimizeSchedule()
File "/home/gager/Halide/apps/onnx/model.py", line 30, in OptimizeSchedule
return model_cpp.AutoSchedule(self.pipeline)
RuntimeError: Caught an unknown exception!

======================================================================
ERROR: test_small_model (model_test.ModelTest)

Traceback (most recent call last):
File "/home/gager/Halide/apps/onnx/model_test.py", line 36, in test_small_model
schedule = model.OptimizeSchedule()
File "/home/gager/Halide/apps/onnx/model.py", line 30, in OptimizeSchedule
return model_cpp.AutoSchedule(self.pipeline)
RuntimeError: Caught an unknown exception!


Ran 5 tests in 0.402s

FAILED (errors=2)
`

@abadams
Copy link
Member

abadams commented Jul 10, 2023

I can confirm that app is currently busted. I have opened a PR to fix in #7673

abadams added a commit that referenced this issue Jul 11, 2023
…7673)

* Update onnx app to Adams2019 autoscheduler and new autoscheduler API

Fixes #7670

* Add model test too

* Remove use of tmpnam

* Don't test onnx app in a 32-bit build
@Gager-Git-life
Copy link
Author

I can confirm that app is currently busted. I have opened a PR to fix in #7673

Yes, thank you. It compiles and passes now.

ardier pushed a commit to ardier/Halide-mutation that referenced this issue Mar 3, 2024
…alide#7673)

* Update onnx app to Adams2019 autoscheduler and new autoscheduler API

Fixes halide#7670

* Add model test too

* Remove use of tmpnam

* Don't test onnx app in a 32-bit build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants