[DOCS] Add comments in layout.h (#249)
This commit is contained in:
@@ -111,10 +111,15 @@ public:
|
|||||||
int rep(size_t k) { return rep_.at(k); }
|
int rep(size_t k) { return rep_.at(k); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
// fragment per warp
|
||||||
std::vector<int> fpw_;
|
std::vector<int> fpw_;
|
||||||
|
// shape per warp
|
||||||
std::vector<int> spw_;
|
std::vector<int> spw_;
|
||||||
|
// warp per tile
|
||||||
std::vector<int> wpt_;
|
std::vector<int> wpt_;
|
||||||
|
// shape per tile
|
||||||
std::vector<int> spt_;
|
std::vector<int> spt_;
|
||||||
|
// repetitions
|
||||||
std::vector<int> rep_;
|
std::vector<int> rep_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -131,7 +136,9 @@ struct scanline_layout: public data_layout {
|
|||||||
int nts(size_t k) { return nts_.at(k); }
|
int nts(size_t k) { return nts_.at(k); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
// micro tile size. The size of a tile held by a thread block.
|
||||||
std::vector<int> mts_;
|
std::vector<int> mts_;
|
||||||
|
// nano tile size. The size of a tile held by a thread.
|
||||||
std::vector<int> nts_;
|
std::vector<int> nts_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -465,7 +465,7 @@ Value* generator::bf16_to_fp32(Value *in0){
|
|||||||
|
|
||||||
Value* generator::fp32_to_bf16(Value *in0){
|
Value* generator::fp32_to_bf16(Value *in0){
|
||||||
if(tgt_->as_nvidia()->sm() >= 80){
|
if(tgt_->as_nvidia()->sm() >= 80){
|
||||||
InlineAsm *ptx = InlineAsm::get(FunctionType::get(builder_->getInt16Ty(), {builder_->getFloatTy()}),
|
InlineAsm *ptx = InlineAsm::get(FunctionType::get(builder_->getInt16Ty(), {builder_->getFloatTy()}, false),
|
||||||
"cvt.rn.bf16.f32 $0, $1;", "=h,r", false);
|
"cvt.rn.bf16.f32 $0, $1;", "=h,r", false);
|
||||||
return call(ptx, {in0});
|
return call(ptx, {in0});
|
||||||
}
|
}
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
#include <pybind11/stl.h>
|
#include <pybind11/stl.h>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
namespace py = pybind11;
|
namespace py = pybind11;
|
||||||
namespace ir = triton::ir;
|
namespace ir = triton::ir;
|
||||||
|
Reference in New Issue
Block a user