Huihuang Zheng

Results 4 comments of Huihuang Zheng

嗨,首先回答issue的问题,从原理上,CINN的算子是由CINN形成,所以如你所说,直接用C++语言的for循环是无法形成IR For的,需要使用你问的ir::For 但是对于实现Argmin/max,这个操作和ReduceMin/Max很像,在一个范围内返回一个Min/Max,只是ReduceMin/Max返回的是最小/最大值,而Argmin/max返回的是最小/最大值对应的位置。 因此你可以跟踪ReduceMin/ReduceMax在ir::Expr层别的实现,相应从最小/最大值改为位置,然后在Compute中调用即可。 我所阐述的ReduceMin/Max代码位置在 https://github.com/PaddlePaddle/CINN/blob/0431271b397196dc5c9c93af1e69e7ec15b5c126/cinn/hlir/pe/reduction.h#L93

我们这边正在查看中,对于您快速解决,可否先注释掉 cinn/auto_schedule/cost_model/CMakeLists.txt 中的 ``` cc_test(test_cost_model SRCS cost_model_test.cc cost_model.cc DEPS pybind gtest_main) target_link_libraries(test_cost_model ${PYTHON_LIBRARIES}) ```

> 🤔 Would you like to [take further update candidates into account](https://github.com/PaddlePaddle/CINN/blob/7e67a17f8aa0267429bffafc8721cbdc1711af33/cinn/runtime/cinn_runtime.h#L222)? Sure, we will try to fix more places like these in the near future. @elfring Thank you for...