[test] added support for max, min reduction and made it easy to add more
This commit is contained in:
@@ -60,15 +60,6 @@ void grids::init_c_graph(ir::instruction *v) {
|
||||
else if(dynamic_cast<ir::downcast_inst*>(v))
|
||||
return;
|
||||
else if(dynamic_cast<ir::reduce_inst*>(v)) {
|
||||
// unsigned axis = reduce->get_axis();
|
||||
// ir::value *arg = reduce->get_operand(0);
|
||||
// auto in_shapes = arg->get_type()->get_tile_shapes();
|
||||
// unsigned current = 0;
|
||||
// for(unsigned i = 0; i < in_shapes.size(); i++){
|
||||
// if(i == axis)
|
||||
// continue;
|
||||
// add_constraint({reduce, current++}, {arg, i});
|
||||
// }
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -305,7 +296,6 @@ void grids::run(ir::module &mod) {
|
||||
for(size_t d = 0; d < shapes.size(); d++){
|
||||
std::string str_d = std::to_string(d);
|
||||
effective_num_threads *= params_.at(i).at("mts.d" + str_d)->get_value();
|
||||
std::cout << shapes[d] << " " << params_.at(i).at("mts.d" + str_d)->get_value() << " " << params_.at(i).at("nts.d" + str_d)->get_value() << std::endl;
|
||||
}
|
||||
if(num_threads != effective_num_threads)
|
||||
throw std::runtime_error("cannot create a kernel with this amount of warps");
|
||||
|
Reference in New Issue
Block a user