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