[CODEGEN] now re-coalescing before atomics (#298)
This commit is contained in:
2
.github/workflows/integration-tests.yml
vendored
2
.github/workflows/integration-tests.yml
vendored
@@ -23,6 +23,7 @@ jobs:
|
||||
alias python='python3'
|
||||
cd python
|
||||
pip3 install -e .
|
||||
rm -r /tmp/triton/
|
||||
|
||||
- name: Unit tests
|
||||
run: |
|
||||
@@ -32,6 +33,7 @@ jobs:
|
||||
- name: Regression tests
|
||||
run: |
|
||||
cd python/test/regression
|
||||
sudo nvidia-smi -i 0 -pm 1
|
||||
sudo nvidia-smi -i 0 --lock-gpu-clocks=1350,1350
|
||||
sudo nvidia-smi -i 0 --lock-memory-clocks=877,877
|
||||
pytest -vs .
|
||||
|
@@ -58,14 +58,14 @@ void coalesce::run(ir::module &mod) {
|
||||
for(ir::basic_block *block: fn->blocks())
|
||||
for(ir::instruction* i: block->get_inst_list()){
|
||||
// coalesce before store
|
||||
if(auto x = dynamic_cast<ir::store_inst*>(i))
|
||||
if(ir::value* op = x->get_value_operand())
|
||||
if(dynamic_cast<ir::store_inst*>(i) || dynamic_cast<ir::atomic_rmw_inst*>(i))
|
||||
if(ir::value* op = i->get_operand(1))
|
||||
if(op->get_type()->is_block_ty())
|
||||
if(layout_->get(op)->to_mma()){
|
||||
builder.set_insert_point(x);
|
||||
builder.set_insert_point(i);
|
||||
ir::instruction* new_op = ir::cvt_layout_inst::create(op);
|
||||
builder.insert(new_op);
|
||||
x->replace_uses_of_with(op, new_op);
|
||||
i->replace_uses_of_with(op, new_op);
|
||||
}
|
||||
// uncoalesce after load
|
||||
if(auto x = dynamic_cast<ir::load_inst*>(i))
|
||||
|
Reference in New Issue
Block a user