[codegen] [liveness] bugfix in live range computation
This commit is contained in:
@@ -37,16 +37,16 @@ void liveness::run(ir::module &mod) {
|
|||||||
if(layout->type != SHARED)
|
if(layout->type != SHARED)
|
||||||
continue;
|
continue;
|
||||||
// users
|
// users
|
||||||
std::set<ir::value*> users;
|
std::set<ir::user*> users;
|
||||||
for(ir::value *v: layout->values){
|
for(ir::value *v: layout->values){
|
||||||
users.insert(v);
|
|
||||||
for(ir::user *u: v->get_users())
|
for(ir::user *u: v->get_users())
|
||||||
users.insert(u);
|
users.insert(u);
|
||||||
}
|
}
|
||||||
// compute intervals
|
// compute intervals
|
||||||
unsigned start = INT32_MAX;
|
unsigned start = INT32_MAX;
|
||||||
unsigned end = 0;
|
unsigned end = 0;
|
||||||
for(ir::value *u: users){
|
for(ir::user *u: users)
|
||||||
|
if(indices.find(u) != indices.end()){
|
||||||
start = std::min(start, indices.at(u));
|
start = std::min(start, indices.at(u));
|
||||||
end = std::max(end, indices.at(u));
|
end = std::max(end, indices.at(u));
|
||||||
}
|
}
|
||||||
|
@@ -231,11 +231,10 @@ std::unique_ptr<driver::module> function::make_bin(ir::module &module, driver::c
|
|||||||
align.run(module);
|
align.run(module);
|
||||||
dce.run(module);
|
dce.run(module);
|
||||||
reassociate.run(module);
|
reassociate.run(module);
|
||||||
dce.run(module);
|
|
||||||
cts.run(module);
|
cts.run(module);
|
||||||
|
dce.run(module);
|
||||||
align.run(module);
|
align.run(module);
|
||||||
axes.run(module);
|
axes.run(module);
|
||||||
// ir::print(module, std::cout);
|
|
||||||
layouts.run(module);
|
layouts.run(module);
|
||||||
liveness.run(module);
|
liveness.run(module);
|
||||||
allocation.run(module);
|
allocation.run(module);
|
||||||
|
@@ -11,17 +11,17 @@ int main() {
|
|||||||
// shapes to benchmark
|
// shapes to benchmark
|
||||||
typedef std::tuple<std::vector<int>, std::vector<int>, std::vector<int>> config_t;
|
typedef std::tuple<std::vector<int>, std::vector<int>, std::vector<int>> config_t;
|
||||||
std::vector<config_t> configs = {
|
std::vector<config_t> configs = {
|
||||||
// {{4096*4096}, {0}, {0}},
|
{{4096*4096}, {0}, {0}},
|
||||||
{{4096, 4096}, {0, 1}, {1, 0}},
|
{{4096, 4096}, {0, 1}, {1, 0}},
|
||||||
// {{4096, 4096}, {0, 1}, {1, 0}},
|
{{4096, 4096}, {0, 1}, {1, 0}},
|
||||||
// {{4096, 4096}, {1, 0}, {0, 1}},
|
{{4096, 4096}, {1, 0}, {0, 1}},
|
||||||
// {{4096, 4096}, {0, 1}, {0, 1}},
|
{{4096, 4096}, {0, 1}, {0, 1}},
|
||||||
// {{256, 256, 256}, {0, 1, 2}, {0, 1, 2}},
|
{{256, 256, 256}, {0, 1, 2}, {0, 1, 2}},
|
||||||
// {{256, 256, 256}, {0, 1, 2}, {0, 2, 1}},
|
{{256, 256, 256}, {0, 1, 2}, {0, 2, 1}},
|
||||||
// {{256, 256, 256}, {1, 0, 2}, {1, 2, 0}},
|
{{256, 256, 256}, {1, 0, 2}, {1, 2, 0}},
|
||||||
// {{256, 256, 256}, {1, 2, 0}, {1, 0, 2}},
|
{{256, 256, 256}, {1, 2, 0}, {1, 0, 2}},
|
||||||
// {{256, 256, 256}, {2, 0, 1}, {0, 1, 2}},
|
{{256, 256, 256}, {2, 0, 1}, {0, 1, 2}},
|
||||||
// {{256, 256, 256}, {2, 1, 0}, {0, 2, 1}}
|
{{256, 256, 256}, {2, 1, 0}, {0, 2, 1}}
|
||||||
};
|
};
|
||||||
// does the work
|
// does the work
|
||||||
std::vector<int32_t> shape;
|
std::vector<int32_t> shape;
|
||||||
|
@@ -13,7 +13,7 @@ int main() {
|
|||||||
for(auto x: std::vector<std::array<bool, 2>>{{false, false}, {false, true},
|
for(auto x: std::vector<std::array<bool, 2>>{{false, false}, {false, true},
|
||||||
{true, false}, {true, true}}){
|
{true, false}, {true, true}}){
|
||||||
std::vector<config_t> tmp = {
|
std::vector<config_t> tmp = {
|
||||||
config_t{ord, x[0], x[1], 2048, 2048, 2048},
|
config_t{ord, x[0], x[1], 4096, 4096, 4096},
|
||||||
// config_t{ord, x[0], x[1], 16, 2048, 2048},
|
// config_t{ord, x[0], x[1], 16, 2048, 2048},
|
||||||
// config_t{ord, x[0], x[1], 32, 2048, 2048},
|
// config_t{ord, x[0], x[1], 32, 2048, 2048},
|
||||||
// config_t{ord, x[0], x[1], 64, 2048, 2048},
|
// config_t{ord, x[0], x[1], 64, 2048, 2048},
|
||||||
|
@@ -12,8 +12,8 @@ int main() {
|
|||||||
std::vector<config_t> configs;
|
std::vector<config_t> configs;
|
||||||
for(int TM: std::vector<int>{32, 64})
|
for(int TM: std::vector<int>{32, 64})
|
||||||
for(int TN: std::vector<int>{32, 64})
|
for(int TN: std::vector<int>{32, 64})
|
||||||
for(int TK: std::vector<int>{8})
|
for(int TK: std::vector<int>{16})
|
||||||
for(int nwarps: std::vector<int>{8})
|
for(int nwarps: std::vector<int>{4})
|
||||||
for(bool AT: std::array<bool, 2>{false, true})
|
for(bool AT: std::array<bool, 2>{false, true})
|
||||||
for(bool BT: std::array<bool, 2>{false, true}){
|
for(bool BT: std::array<bool, 2>{false, true}){
|
||||||
configs.push_back(config_t{FLOAT, AT, BT, 128, 128, 128, TM, TN, TK, nwarps});
|
configs.push_back(config_t{FLOAT, AT, BT, 128, 128, 128, TM, TN, TK, nwarps});
|
||||||
|
Reference in New Issue
Block a user