fp8 <> bf16 conversion (#637)

Co-authored-by: Philippe Tillet <phil@openai.com>
This commit is contained in:
Da Yan
2022-08-31 05:20:12 +08:00
committed by GitHub
parent 210a296699
commit 437ced38c2
5 changed files with 133 additions and 10 deletions

View File

@@ -36,6 +36,9 @@ int membar::group_of(ir::value* v, std::vector<ir::value*> &async_write) {
else{
if(layouts_->has_tmp(v))
return async_write.size() - 1;
// // Ignore copy_to_shared. It won't modify async behavior.
// if(dynamic_cast<ir::copy_to_shared_inst*>(v))
// return 0;
auto it = std::find(async_write.begin(), async_write.end(), v);
return std::distance(async_write.begin(), it);
}