[CODEGEN] Fixed bug in atomic_add

This commit is contained in:
Philippe Tillet
2020-11-19 18:19:55 -05:00
parent 7d095ec686
commit baa858aa74
5 changed files with 37 additions and 24 deletions

View File

@@ -230,6 +230,7 @@ std::unique_ptr<driver::module> function::make_bin(ir::module &module,
}
peephole.run(module);
dce.run(module);
// ir::print(module, std::cout);
align.run(module);
axes.run(module);
layouts.run(module);
@@ -238,7 +239,6 @@ std::unique_ptr<driver::module> function::make_bin(ir::module &module,
if(allocation.allocated_size() > context->device()->max_shared_memory())
throw std::runtime_error("using too much shared memory");
barriers.run(module);
//ir::print(module, std::cout);
isel.visit(module, *llvm);
std::unique_ptr<driver::module> res(driver::module::create(context, std::move(llvm)));
return res;
@@ -364,6 +364,8 @@ std::string function::preheader() {
DECLARATION(float, 64, 64);
DECLARATION(half , 64, 64);
DECLARATION(half , 64, 128);
DECLARATION(half , 128, 64);
DECLARATION(half , 128, 128);
extern int atomic_cas(int*, int, int);