repo_name
stringlengths
1
62
dataset
stringclasses
1 value
lang
stringclasses
11 values
pr_id
int64
1
20.1k
owner
stringlengths
2
34
reviewer
stringlengths
2
39
diff_hunk
stringlengths
15
262k
code_review_comment
stringlengths
1
99.6k
intel-xpu-backend-for-triton
github_2023
cpp
2,181
intel
whitneywhtsang
@@ -714,56 +804,69 @@ struct LoadOpConversion auto typeConverter = getTypeConverter(); auto *ctx = rewriter.getContext(); - // original values - Value ptr = op.getPtr(); - Value mask = op.getMask(); - Value other = op.getOther(); - - // adaptor values - if (isTensorPointerType(ptr.getType(...
```suggestion // contiguous on the fast changing dim when fallback to gather load. ```
intel-xpu-backend-for-triton
github_2023
others
2,181
intel
whitneywhtsang
@@ -255,3 +255,44 @@ module attributes {"triton_gpu.num-warps" = 1 : i32, "triton_gpu.threads-per-war tt.return } } + +// ----- + +#dpas = #triton_intel_gpu.dpas<{repeatCount = 8, systolicDepth = 8, executionSize = 16, opsPerChan = 2, threadsPerWarp = 16, warpsPerCTA = [1, 1], repCluster = [1, 1], A = [8, 16...
`dot_a` and `dot_b` are the same, is it a typo?
intel-xpu-backend-for-triton
github_2023
others
2,181
intel
whitneywhtsang
@@ -255,3 +255,44 @@ module attributes {"triton_gpu.num-warps" = 1 : i32, "triton_gpu.threads-per-war tt.return } } + +// ----- + +#dpas = #triton_intel_gpu.dpas<{repeatCount = 8, systolicDepth = 8, executionSize = 16, opsPerChan = 2, threadsPerWarp = 16, warpsPerCTA = [1, 1], repCluster = [1, 1], A = [8, 16...
can we remove variables not used?
intel-xpu-backend-for-triton
github_2023
others
2,181
intel
whitneywhtsang
@@ -352,3 +352,22 @@ module attributes {"triton_gpu.num-warps" = 8 : i32, "triton_gpu.threads-per-war tt.return } } + +// ----- + +#blocked = #triton_gpu.blocked<{sizePerThread = [1, 1], threadsPerWarp = [1, 16], warpsPerCTA = [2, 4], order = [1, 0]}> +module attributes {"triton_gpu.num-warps" = 8 : i32, "trit...
please remove unused variables.
intel-xpu-backend-for-triton
github_2023
cpp
2,181
intel
whitneywhtsang
@@ -187,6 +187,106 @@ struct LoadStoreConversionBase { return axisAnalysisPass.getMaskAlignment(mask); } + std::tuple<SmallVector<Value>, SmallVector<Value>, SmallVector<Value>> + convertBlockPtrToTensorOfPtr( + Location loc, Value blockPointerStruct, RankedTensorType tensorType, + Type valueElemT...
```suggestion unsigned blockOffset = 0, blockShape = 1 * rank, ```
intel-xpu-backend-for-triton
github_2023
cpp
2,181
intel
whitneywhtsang
@@ -187,6 +187,106 @@ struct LoadStoreConversionBase { return axisAnalysisPass.getMaskAlignment(mask); } + std::tuple<SmallVector<Value>, SmallVector<Value>, SmallVector<Value>> + convertBlockPtrToTensorOfPtr( + Location loc, Value blockPointerStruct, RankedTensorType tensorType, + Type valueElemT...
```suggestion for (unsigned j = 0; j < rank; ++j) { ```
intel-xpu-backend-for-triton
github_2023
cpp
2,181
intel
whitneywhtsang
@@ -187,6 +187,106 @@ struct LoadStoreConversionBase { return axisAnalysisPass.getMaskAlignment(mask); } + std::tuple<SmallVector<Value>, SmallVector<Value>, SmallVector<Value>> + convertBlockPtrToTensorOfPtr( + Location loc, Value blockPointerStruct, RankedTensorType tensorType, + Type valueElemT...
```suggestion for (unsigned i = 0; i < numElems; ++i) { ```
intel-xpu-backend-for-triton
github_2023
cpp
2,349
intel
chengjunlu
@@ -41,26 +48,47 @@ struct TritonIntelGPUMaterializeBlockPointerPass "Expected 'loadOp' to load a tensor value."); tt::MakeTensorPtrOp makeTensorPtrOp = getMakeTensorPtrOp(ptr); + LDBG("Found make tensor ptr op: " << makeTensorPtrOp); auto ptrType = cast<tt::PointerType>(makeTensorPtr...
Clean the comment out code.
intel-xpu-backend-for-triton
github_2023
cpp
2,349
intel
whitneywhtsang
@@ -51,17 +51,27 @@ struct TritonIntelGPUMaterializeBlockPointerPass LDBG("Found make tensor ptr op: " << makeTensorPtrOp); auto ptrType = cast<tt::PointerType>(makeTensorPtrOp.getType()); auto tensorType = cast<RankedTensorType>(ptrType.getPointeeType()); - ArrayRef<int32_t> order = makeTenso...
```suggestion for (size_t i = 0; i < strides.size(); ++i) { ```
intel-xpu-backend-for-triton
github_2023
cpp
2,349
intel
whitneywhtsang
@@ -51,17 +51,27 @@ struct TritonIntelGPUMaterializeBlockPointerPass LDBG("Found make tensor ptr op: " << makeTensorPtrOp); auto ptrType = cast<tt::PointerType>(makeTensorPtrOp.getType()); auto tensorType = cast<RankedTensorType>(ptrType.getPointeeType()); - ArrayRef<int32_t> order = makeTenso...
is `order` being used?
intel-xpu-backend-for-triton
github_2023
python
2,148
intel
etiotto
@@ -51,6 +53,7 @@ class XPUOptions: max_num_imprecise_acc_default: int = 0 # `max_num_imprecise_acc` only applies to fp8 -> fp32 dot on sm_90 for cuda extern_libs: dict = None debug: bool = False + generate_native_code: bool = True
I would default this to False
intel-xpu-backend-for-triton
github_2023
python
2,148
intel
etiotto
@@ -296,7 +300,60 @@ def make_spv(src, metadata, options): else: metadata["build_flags"] = "" - return ret + if options.generate_native_code is True: + with tempfile.NamedTemporaryFile(delete=False, mode='wb', suffix='.spv') as fsrc, \ + tempfile.NamedTemp...
The device is hardcoded to PVC. I do not think that would work for older devices. Can we choose the device based on the information PyTorch passes to the compiler ?
intel-xpu-backend-for-triton
github_2023
c
2,148
intel
etiotto
@@ -169,35 +173,39 @@ static PyObject *loadBinary(PyObject *self, PyObject *args) { int32_t n_spills = props.spillMemSize; const int32_t n_regs = 0; - constexpr int32_t max_reg_spill = 1000; - std::string build_flags_str(build_flags); - bool is_GRF_mode_specified = false; - - // Check whether the GRF mode i...
[nit]: early exit if `is_spv` is false
intel-xpu-backend-for-triton
github_2023
python
2,148
intel
victor-eds
@@ -296,7 +300,60 @@ def make_spv(src, metadata, options): else: metadata["build_flags"] = "" - return ret + if options.generate_native_code is True:
```suggestion if options.generate_native_code: ```
intel-xpu-backend-for-triton
github_2023
python
2,148
intel
victor-eds
@@ -296,7 +300,60 @@ def make_spv(src, metadata, options): else: metadata["build_flags"] = "" - return ret + if options.generate_native_code is True: + with tempfile.NamedTemporaryFile(delete=False, mode='wb', suffix='.spv') as fsrc, \ + tempfile.NamedTemp...
```suggestion metadata["build_flags"] ``` Why format string?
intel-xpu-backend-for-triton
github_2023
python
2,148
intel
victor-eds
@@ -296,7 +300,60 @@ def make_spv(src, metadata, options): else: metadata["build_flags"] = "" - return ret + if options.generate_native_code is True: + with tempfile.NamedTemporaryFile(delete=False, mode='wb', suffix='.spv') as fsrc, \ + tempfile.NamedTemp...
```suggestion subprocess.run(ocloc_cmd, check=True, close_fds=False, stdout=flog, stderr=subprocess.STDOUT) ``` Why do we redirect `stderr` to `stdout`?
intel-xpu-backend-for-triton
github_2023
python
2,148
intel
victor-eds
@@ -296,7 +300,60 @@ def make_spv(src, metadata, options): else: metadata["build_flags"] = "" - return ret + if options.generate_native_code is True: + with tempfile.NamedTemporaryFile(delete=False, mode='wb', suffix='.spv') as fsrc, \ + tempfile.NamedTemp...
Why stringdoc? Can we `# comment` instead?
intel-xpu-backend-for-triton
github_2023
python
2,148
intel
victor-eds
@@ -296,7 +300,60 @@ def make_spv(src, metadata, options): else: metadata["build_flags"] = "" - return ret + if options.generate_native_code is True: + with tempfile.NamedTemporaryFile(delete=False, mode='wb', suffix='.spv') as fsrc, \ + tempfile.NamedTemp...
```suggestion ocloc_cmd[-1] = metadata["build_flags"] ``` Again, why string format?
intel-xpu-backend-for-triton
github_2023
python
2,148
intel
victor-eds
@@ -296,7 +300,60 @@ def make_spv(src, metadata, options): else: metadata["build_flags"] = "" - return ret + if options.generate_native_code is True: + with tempfile.NamedTemporaryFile(delete=False, mode='wb', suffix='.spv') as fsrc, \ + tempfile.NamedTemp...
Why `stderr > stdout`?
intel-xpu-backend-for-triton
github_2023
python
2,148
intel
victor-eds
@@ -296,7 +300,60 @@ def make_spv(src, metadata, options): else: metadata["build_flags"] = "" - return ret + if options.generate_native_code is True: + with tempfile.NamedTemporaryFile(delete=False, mode='wb', suffix='.spv') as fsrc, \ + tempfile.NamedTemp...
Why this instead of relying on `delete=True` from `NamedTemporaryFile`?
intel-xpu-backend-for-triton
github_2023
python
2,148
intel
victor-eds
@@ -296,7 +300,60 @@ def make_spv(src, metadata, options): else: metadata["build_flags"] = "" - return ret + if options.generate_native_code is True: + with tempfile.NamedTemporaryFile(delete=False, mode='wb', suffix='.spv') as fsrc, \ + tempfile.NamedTemp...
Wouldn't it be open already as `flog`?
intel-xpu-backend-for-triton
github_2023
python
2,148
intel
victor-eds
@@ -296,7 +300,60 @@ def make_spv(src, metadata, options): else: metadata["build_flags"] = "" - return ret + if options.generate_native_code is True: + with tempfile.NamedTemporaryFile(delete=False, mode='wb', suffix='.spv') as fsrc, \ + tempfile.NamedTemp...
```suggestion error = f'`ocloc` failed with error code {e.returncode}' ``` Isn't this + printing log enough?
intel-xpu-backend-for-triton
github_2023
cpp
2,148
intel
victor-eds
@@ -37,6 +52,15 @@ inline std::string parseZeResultCode(const ze_result_t code) { } \ } +// TODO: share Triton GetEnv.hpp impl +inline std::string getStrEnv(const std::string &env) { + const char *cstr = std::getenv(env.c_str()); + if ...
Why not do it now?
intel-xpu-backend-for-triton
github_2023
cpp
2,148
intel
victor-eds
@@ -23,6 +24,20 @@ typedef struct l0_resc_handles { using SyclQueueMap = std::unordered_map<sycl::queue, l0_resc_handles>; +// Create an exception handler for asynchronous SYCL exceptions +auto exception_handler = [](sycl::exception_list e_list) { + for (std::exception_ptr const &e : e_list) { + try { + s...
1. Why only report message on debug? 2. We are reporting only first as we call `std::terminate` 3. Reporting and `std::terminate`-ing is exactly what the default handler does. Why override?
intel-xpu-backend-for-triton
github_2023
python
2,331
intel
jopperm
@@ -179,6 +215,78 @@ def sqrt(arg0, _builder=None): }, is_pure=True, _builder=_builder) +@core.extern +def add_rn(arg0, arg1, _builder=None): + return core.extern_elementwise( + "", "", [arg0, arg1], { + (core.dtype("fp64"), core.dtype("fp64")): ("__imf_dadd_rn", core.dtype("fp64")), +...
Is it intentional that the fp64 version is specified first?
intel-xpu-backend-for-triton
github_2023
python
2,331
intel
FMarno
@@ -1158,6 +1316,15 @@ def erfcx(arg0, _builder=None): }, is_pure=True, _builder=_builder) +@core.extern +def erfcinv(arg0, _builder=None): + return core.extern_elementwise( + "", "", [arg0], { + (core.dtype("fp32"), ): ("__imf_erfcinvf", core.dtype("fp32")), + (core.dtype("...
```suggestion (core.dtype("fp64"), ): ("__imf_erfcinvd", core.dtype("fp64")), ``` Is this missing the return? I'm just guessing from usually mangling rules, but I guess these may not be mangled.
intel-xpu-backend-for-triton
github_2023
others
2,318
intel
victor-eds
@@ -284,4 +284,15 @@ def TritonIntelGPUMaterializeBlockPointer : Pass<"tritonintelgpu-materialize-blo "mlir::arith::ArithDialect"]; } +def TritonIntelGPUScheduleOps : Pass<"tritonintelgpu-schedule-ops", "mlir::ModuleOp"> { + let summary = ""; + + let description = [{ + }];
Can we add both summary and description?
intel-xpu-backend-for-triton
github_2023
others
2,304
intel
whitneywhtsang
@@ -210,6 +210,9 @@ run_interpreter_tests() { TRITON_INTERPRET=1 TRITON_TEST_SUITE=interpreter \ pytest -vvv -n 16 -m interpreter language/test_core.py language/test_standard.py \ language/test_random.py --device cpu + + TRITON_DISABLE_LINE_INFO=0 TRITON_INTERPRET=1 TRITON_TEST_SUITE=interpreter_line_info...
Is there a reason why not run it as the same command line as above like https://github.com/intel/intel-xpu-backend-for-triton/blob/main/.github/workflows/integration-tests.yml#L255?
intel-xpu-backend-for-triton
github_2023
others
2,272
intel
pbchekin
@@ -126,6 +126,6 @@ jobs: mode: ${{ matrix.mode }} test_mode: accuracy dtype: ${{ matrix.dtype }} - models: "all" + models: "subset"
Nit: for consistency ```suggestion models: subset ```
intel-xpu-backend-for-triton
github_2023
others
2,293
intel
anmyachev
@@ -121,9 +121,10 @@ jobs: else skiplist= fi + { echo SKIPLIST="$skiplist" - echo TRITON_TEST_CMD="bash -v -x scripts/test-triton.sh --warning-reports --skip-pytorch-install --reports-dir $GITHUB_WORKSPACE/reports --ignore-errors $skiplist" + ...
? ```suggestion echo TRITON_TEST_CMD="bash -v -x scripts/test-triton.sh --warning-reports --skip-pytorch-install --reports-dir $GITHUB_WORKSPACE/reports ${{ inputs.ignore_errors && '--ignore-errors' || '' }} $skiplist" ```
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
sommerlukas
@@ -230,19 +275,26 @@ def main(): print("Failed to obtain raw data") sys.exit(1) - df = parse_directory(num_cfg, None, num_dir) - df = parse_directory(denom_cfg, df, denom_dir) + df = parse_directory(args, num_cfg, None, num_dir) + df = parse_directory(args, denom...
Nit: I'd prefer a regular if/else for a multi-line list construction.
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
sommerlukas
@@ -188,12 +203,40 @@ def eval_data(df: pd.DataFrame, numerator: str, denominator: str, plot: bool): ax = sns.boxplot(df, x="xlabel", y="relative difference", order=order) - ax.set(xlabel=None, ylabel="Relative difference in speedup") + ax.set(xlabel=None, ylabel="Relative differe...
Why do we need to pass around the entire `args` structure? AFAICT, only two boolean value (no-plot, triton-benchmark) are used from it.
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
sommerlukas
@@ -74,48 +74,63 @@ def get_raw_data(args: argparse.Namespace) -> tuple[Optional[Path], Optional[Pat return num_dir, denom_dir -def parse_data(config: str, df: pd.DataFrame, file: Path) -> pd.DataFrame: +def parse_data(args: argparse.Namespace, config: str, df: pd.DataFrame, file: Path) -> pd.DataFrame: "...
The reuse of code between the two different paths in this function seems negligible. Why not have two different functions and call them depending on whether we parse Triton benchmarks or Pytorch benchmarks?
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
sommerlukas
@@ -142,13 +157,13 @@ def eval_data(df: pd.DataFrame, numerator: str, denominator: str, plot: bool): df["relative difference"] = (df[num_col] - df[denom_col]) / df[denom_col] - print("Overview of relative difference in speedup.\n" + print("Overview of relative difference in perf.\n" "Relative ...
What number is printed in the Triton benchmark case? Is that also speedup?
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
victor-eds
@@ -97,25 +96,65 @@ def parse_data(config: str, df: pd.DataFrame, file: Path) -> pd.DataFrame: return pd.concat([df, raw_data], ignore_index=True) -def parse_directory(config: str, previous: pd.DataFrame, directory: Path) -> pd.DataFrame: +def merge_triton_xetla_reports_data(config: str, triton_file: Path, xet...
```suggestion def build_triton_benchmark_reports_path(directory: Path, report_name: str) -> str: """Construct the full file path for a given report name.""" return os.path.join(directory, "benchmark-reports", f"{report_name}-report.csv") ``` NIT: use `os.path.join`
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
victor-eds
@@ -97,25 +96,65 @@ def parse_data(config: str, df: pd.DataFrame, file: Path) -> pd.DataFrame: return pd.concat([df, raw_data], ignore_index=True) -def parse_directory(config: str, previous: pd.DataFrame, directory: Path) -> pd.DataFrame: +def merge_triton_xetla_reports_data(config: str, triton_file: Path, xet...
```suggestion reports = ["softmax", "gemm", "attn"] reports_list = [df] for report in reports: triton_file = f"{report}-triton" xetla_file = f"{report}-xetla" triton_path = build_triton_benchmark_reports_path(Path(directory), triton_file) xetla_path = build_triton_be...
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
victor-eds
@@ -97,25 +96,65 @@ def parse_data(config: str, df: pd.DataFrame, file: Path) -> pd.DataFrame: return pd.concat([df, raw_data], ignore_index=True) -def parse_directory(config: str, previous: pd.DataFrame, directory: Path) -> pd.DataFrame: +def merge_triton_xetla_reports_data(config: str, triton_file: Path, xet...
```suggestion on = ["params", "benchmark"] if triton_benchmark else ["suite", "datatype", "mode", "name", "dev"] df = df.merge(previous, how="outer", on=on) ``` More readable IMO
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
victor-eds
@@ -169,12 +208,13 @@ def eval_data(df: pd.DataFrame, numerator: str, denominator: str, plot: bool): import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages - df["xlabel"] = df[["suite", "mode", "datatype"]].agg(", ".join, axis=1) + df["xlabel"] = df[["para...
```suggestion keys = ["params", "benchmark"] if triton_benchmark else ["suite", "mode", "datatype"] df["xlabel"] = df[keys].agg(", ".join, axis=1) ``` Readability
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
anmyachev
@@ -97,25 +96,64 @@ def parse_data(config: str, df: pd.DataFrame, file: Path) -> pd.DataFrame: return pd.concat([df, raw_data], ignore_index=True) -def parse_directory(config: str, previous: pd.DataFrame, directory: Path) -> pd.DataFrame: +def merge_triton_xetla_reports_data(config: str, triton_file: Path, xet...
```suggestion def parse_triton_benchmark_data(config: str, directory: Path) -> pd.DataFrame: ```
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
anmyachev
@@ -97,25 +96,64 @@ def parse_data(config: str, df: pd.DataFrame, file: Path) -> pd.DataFrame: return pd.concat([df, raw_data], ignore_index=True) -def parse_directory(config: str, previous: pd.DataFrame, directory: Path) -> pd.DataFrame: +def merge_triton_xetla_reports_data(config: str, triton_file: Path, xet...
```suggestion reports_list = [] ```
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
anmyachev
@@ -97,25 +96,64 @@ def parse_data(config: str, df: pd.DataFrame, file: Path) -> pd.DataFrame: return pd.concat([df, raw_data], ignore_index=True) -def parse_directory(config: str, previous: pd.DataFrame, directory: Path) -> pd.DataFrame: +def merge_triton_xetla_reports_data(config: str, triton_file: Path, xet...
```suggestion triton_path = build_triton_benchmark_reports_path(directory, triton_file) xetla_path = build_triton_benchmark_reports_path(directory, xetla_file) ```
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
anmyachev
@@ -97,25 +96,64 @@ def parse_data(config: str, df: pd.DataFrame, file: Path) -> pd.DataFrame: return pd.concat([df, raw_data], ignore_index=True) -def parse_directory(config: str, previous: pd.DataFrame, directory: Path) -> pd.DataFrame: +def merge_triton_xetla_reports_data(config: str, triton_file: Path, xet...
```suggestion df = parse_triton_benchmark_data(config, directory) ```
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
anmyachev
@@ -97,25 +96,64 @@ def parse_data(config: str, df: pd.DataFrame, file: Path) -> pd.DataFrame: return pd.concat([df, raw_data], ignore_index=True) -def parse_directory(config: str, previous: pd.DataFrame, directory: Path) -> pd.DataFrame: +def merge_triton_xetla_reports_data(config: str, triton_file: Path, xet...
```suggestion def parse_directory(triton_benchmark: bool, config: str, directory: Path) -> pd.DataFrame: ```
intel-xpu-backend-for-triton
github_2023
python
2,060
intel
anmyachev
@@ -230,19 +288,29 @@ def main(): print("Failed to obtain raw data") sys.exit(1) - df = parse_directory(num_cfg, None, num_dir) - df = parse_directory(denom_cfg, df, denom_dir) + df = parse_directory(args.triton_benchmark, num_cfg, None, num_dir) + df = parse_dire...
```suggestion num_df = parse_directory(args.triton_benchmark, num_cfg, num_dir) denom_df = parse_directory(args.triton_benchmark, denom_cfg, denom_dir) on = ["params", "benchmark"] if args.triton_benchmark else ["suite", "datatype", "mode", "name", "dev"] df = denom_df.merge(num_df...
intel-xpu-backend-for-triton
github_2023
python
2,300
intel
whitneywhtsang
@@ -229,8 +229,11 @@ def benchmark(Z, H, N_CTX, D_HEAD, provider): # FIXME: use torch sdpa for result check after https://github.com/intel/intel-xpu-backend-for-triton/issues/2042 fixed torch_fn = lambda: torch.nn.functional.scaled_dot_product_attention( q, k, v, attn_mask=Non...
Can we move the above FIXME to the else clause?
intel-xpu-backend-for-triton
github_2023
cpp
2,283
intel
victor-eds
@@ -249,8 +206,9 @@ static bool isOCLBuiltinAvailable(TritonGEN::Matrix2DBlockLoadOp op) { return false; } -static Value createGenISA2DBlockRead(TritonGEN::Matrix2DBlockLoadOp op, - ConversionPatternRewriter &rewriter) { +[[maybe_unused]] static Value +createGenISA2DBlockRead(T...
This is used, right?
intel-xpu-backend-for-triton
github_2023
cpp
2,283
intel
victor-eds
@@ -1013,9 +919,8 @@ struct TritonMatrix2DBlockLoadLowering return success(); } - // TODO: Remove GenISA lowering after PoC productization is completed. - if (tools::getBoolEnv("TRITONGEN_FORCE_GENISA") || - !isOCLBuiltinAvailable(op)) { + if (!isOCLBuiltinAvailable(op)) { + op.emitWa...
Can we split the read in several calls and concat the obtained vectors to avoid using GENISA?
intel-xpu-backend-for-triton
github_2023
cpp
2,291
intel
victor-eds
@@ -564,13 +564,26 @@ struct LoadOpConversion unsigned numRepOuter = numReps[opIdx]; unsigned numRepInner = numReps[!opIdx]; + + Value pitch = trunc(i32_ty, rowStride); + if (!memoryRowMajor) { + // Column major memory. We need to swap the width and height because HW + // only support row ma...
```suggestion Value pitch; if (memoryRowMajor) { pitch = trunc(i32_ty, rowStride); } else { // Column major memory. We need to swap the width and height because HW // only support row major memory layout. pitch = trunc(i32_ty, colStride); std::swap(baseWidth, baseHeight...
intel-xpu-backend-for-triton
github_2023
others
2,230
intel
pbchekin
@@ -146,6 +146,12 @@ jobs: run: | ${{ env.TRITON_TEST_CMD }} --instrumentation --skip-pip-install + - name: Run benchmarks
We do not need benchmarks in build-test, they are running daily in triton-benchmarks.
intel-xpu-backend-for-triton
github_2023
cpp
2,294
intel
victor-eds
@@ -615,9 +615,9 @@ struct TritonGENSubgroupIdLowering funcAttrs.memEffectsAttr = memory_zero; intel::AttributeList passthroughAttrs = createFunctionAttributes( {{llvm::Attribute::NoSync, std::nullopt}}, ctx); - LLVM::CallOp callOp = - createDeviceFunctionCall(rewriter, "_Z16get_sub_group_i...
Why move if these are passed by const-ref?
intel-xpu-backend-for-triton
github_2023
others
2,281
intel
whitneywhtsang
@@ -109,10 +109,12 @@ jobs: run: | cd benchmarks/triton_kernels_benchmark python gemm_benchmark.py --reports $REPORTS + mv $REPORTS/matmul-performance.csv $REPORTS/matmul-performance-base.csv source ../../scripts/capture-hw-details.sh + TAG=${{ inputs.tag ||...
Aren't these csv names defined in the benchmarks? Why would this work?
intel-xpu-backend-for-triton
github_2023
others
2,245
intel
anmyachev
@@ -8,39 +8,96 @@ This is the development repository of Intel® XPU Backend for Triton\*, a new [T # Compatibility - |Category|Requirement|Installation| - |-|-|-| - |OS|Ubuntu [22.04](http://releases.ubuntu.com/22.04/)| [Install Ubuntu](https://ubuntu.com/tutorials)| - |GPU Card | Intel® Data Center GPU Max, Fl...
The prerequisites are the same, can there only be one copy of them?
intel-xpu-backend-for-triton
github_2023
others
2,245
intel
anmyachev
@@ -8,39 +8,96 @@ This is the development repository of Intel® XPU Backend for Triton\*, a new [T # Compatibility - |Category|Requirement|Installation| - |-|-|-| - |OS|Ubuntu [22.04](http://releases.ubuntu.com/22.04/)| [Install Ubuntu](https://ubuntu.com/tutorials)| - |GPU Card | Intel® Data Center GPU Max, Fl...
This is not necessary unless we use `--no-build-isolation`. https://github.com/intel/intel-xpu-backend-for-triton/blob/3fc58dff56b558f3814beb038ba234aeb42e9ea1/python/pyproject.toml#L3 will handle build dependencies automatically.
intel-xpu-backend-for-triton
github_2023
others
2,245
intel
vlad-penkin
@@ -8,39 +8,90 @@ This is the development repository of Intel® XPU Backend for Triton\*, a new [T # Compatibility - |Category|Requirement|Installation| - |-|-|-| - |OS|Ubuntu [22.04](http://releases.ubuntu.com/22.04/)| [Install Ubuntu](https://ubuntu.com/tutorials)| - |GPU Card | Intel® Data Center GPU Max, Fl...
I suggest to add the clarification that PTI / Kineto doesn't work for Triton kernels themselves as of now.
intel-xpu-backend-for-triton
github_2023
others
2,245
intel
vlad-penkin
@@ -8,39 +8,90 @@ This is the development repository of Intel® XPU Backend for Triton\*, a new [T # Compatibility - |Category|Requirement|Installation| - |-|-|-| - |OS|Ubuntu [22.04](http://releases.ubuntu.com/22.04/)| [Install Ubuntu](https://ubuntu.com/tutorials)| - |GPU Card | Intel® Data Center GPU Max, Fl...
Let's add a provision in case you installed system wide.
intel-xpu-backend-for-triton
github_2023
others
2,245
intel
vlad-penkin
@@ -8,39 +8,90 @@ This is the development repository of Intel® XPU Backend for Triton\*, a new [T # Compatibility - |Category|Requirement|Installation| - |-|-|-| - |OS|Ubuntu [22.04](http://releases.ubuntu.com/22.04/)| [Install Ubuntu](https://ubuntu.com/tutorials)| - |GPU Card | Intel® Data Center GPU Max, Fl...
Our preference is for user to install our nightly wheels.
intel-xpu-backend-for-triton
github_2023
cpp
2,100
intel
victor-eds
@@ -50,48 +49,56 @@ using namespace mlir::triton::gpu; // Helper Functions //===----------------------------------------------------------------------===// -static intel::AttributeList createFunctionAttributes( - ArrayRef<std::pair<llvm::Attribute::AttrKind, std::optional<uint64_t>>> - attributes, - ML...
Make static too
intel-xpu-backend-for-triton
github_2023
cpp
2,100
intel
victor-eds
@@ -50,48 +49,56 @@ using namespace mlir::triton::gpu; // Helper Functions //===----------------------------------------------------------------------===// -static intel::AttributeList createFunctionAttributes( - ArrayRef<std::pair<llvm::Attribute::AttrKind, std::optional<uint64_t>>> - attributes, - ML...
I don't like this. I think simply doing it inline the MLIR way instead of going via the LLVM names is cleaner.
intel-xpu-backend-for-triton
github_2023
others
2,100
intel
etiotto
@@ -1,5 +1,4 @@ add_triton_library(TritonGENToLLVM - Attributes.cpp
I think we should continue to build this file.
intel-xpu-backend-for-triton
github_2023
cpp
2,217
intel
whitneywhtsang
@@ -644,10 +644,9 @@ sycl::event fmha_forward_impl(sycl::queue &q, void *_q, void *_k, void *_v, uint32_t size_ml = shape.get_ml_size(); // forward - // T *query = sycl::malloc_shared<T>(size_query, q); + T *query = sycl::malloc_shared<T>(size_query, q);
@anmyachev Thanks for the investigation! For a fair comparison, it makes sense to make the operating conditions as close as possible across implementations. Let's keep this PR up for a day so others can chime in if they have an opinion.
intel-xpu-backend-for-triton
github_2023
cpp
2,227
intel
victor-eds
@@ -48,6 +48,19 @@ template <typename Op> static LogicalResult verifyMatrixInput(Op op) { return success(); } +template <typename Op> +static LogicalResult verifySIMDBlockTy(Op op, VectorType vecTy) { + unsigned numElems = vecTy.getNumElements(); + IntegerType elemTy = cast<IntegerType>(vecTy.getElementType());...
```suggestion static LogicalResult verifySIMDBlockTy(Operation *op, VectorType vecTy) { unsigned numElems = vecTy.getNumElements(); IntegerType elemTy = cast<IntegerType>(vecTy.getElementType()); // FIXME: Allow 16xi16 when SPIRV-LLVM translator supports it. if (numElems != 1 && numElems != 2 && numElems...
intel-xpu-backend-for-triton
github_2023
cpp
2,193
intel
victor-eds
@@ -282,8 +282,17 @@ class LoadStorePrefetchOpConversion if constexpr (std::is_same_v<OpType, LoadOp>) { rewriter.restoreInsertionPoint(insertPoint); - TritonGEN::SIMDBlockReadOp simdRead = - rewriter.create<TritonGEN::SIMDBlockReadOp>(loc, v64i16Ty, base); + VectorType v8i16Ty = Vector...
```suggestion VectorType v8i16Ty = VectorType::get(8, i16_ty); SmallVector<Value> values; Value offset = i32_val(/*getSubGroupSize()*/); for (int i = 0; i < 8; ++i) { auto simdRead = rewriter.create<TritonGEN::SIMDBlockReadOp>(loc, v8i16Ty, base); values.push...
intel-xpu-backend-for-triton
github_2023
cpp
2,193
intel
victor-eds
@@ -435,3 +435,20 @@ LogicalResult TritonGEN::Matrix2DBlockPrefetchOp::verify() { return success(); } + +//===----------------------------------------------------------------------===// +// gen.simdblockread +//===----------------------------------------------------------------------===// + +LogicalResult TritonG...
For future: Change operation signature to use scalars instead of vectors of length 1.
intel-xpu-backend-for-triton
github_2023
cpp
2,193
intel
etiotto
@@ -282,8 +282,20 @@ class LoadStorePrefetchOpConversion if constexpr (std::is_same_v<OpType, LoadOp>) { rewriter.restoreInsertionPoint(insertPoint); - TritonGEN::SIMDBlockReadOp simdRead = - rewriter.create<TritonGEN::SIMDBlockReadOp>(loc, v64i16Ty, base); + const unsigned maxOCLVector...
Use constexpr to declare the variable
intel-xpu-backend-for-triton
github_2023
others
2,219
intel
pbchekin
@@ -66,11 +66,7 @@ jobs: - name: Matrix id: matrix run: | - if [[ -n "${{ inputs.runner_label }}" ]]; then - matrix='{"python": ["3.9", "3.10", "3.11", "3.12"]}' - else - matrix='{"python": ["3.9", "3.10", "3.11", "3.12"], "driver": ["rolling", "lts"]}' -...
This is not what we discussed. For the normal flow you need 3 matrixes: * python for inductor tests * python x driver for integration tests * e2e matrix
intel-xpu-backend-for-triton
github_2023
cpp
2,216
intel
whitneywhtsang
@@ -402,25 +405,55 @@ void PrefetchBlockPass::injectPrefetchOpsInBody( auto yield = cast<scf::YieldOp>(newLoop.getBody()->getTerminator()); loop.erase(); + Attribute attr = loop->getAttr(AttrWorkloadName); + assert(attr && "Expecting a workload attribute"); + Workload workload = static_cast<Workload>(cast<In...
please remove
intel-xpu-backend-for-triton
github_2023
cpp
2,233
intel
victor-eds
@@ -853,7 +853,7 @@ static Value allocateSLMForTransposedReduction(tt::ReduceOp op, unsigned step, Location loc = op.getLoc(); // Fixed size for num_warps matrices of sg_size^2 shape. - int64_t size = step * step * srcTy.getElementTypeBitWidth() / 8 * + int64_t size = (int64_t)step * step * srcTy.getElementTy...
```suggestion int64_t size = static_cast<int64_t>(step) * step * srcTy.getElementTypeBitWidth() / 8 * ``` Can we go with that instead? (No C-cast)
intel-xpu-backend-for-triton
github_2023
cpp
2,180
intel
jopperm
@@ -428,7 +428,8 @@ class TritonIntelGPUDistributeToWarpsPass else if (auto makeRange = dyn_cast<tt::MakeRangeOp>(op)) distributeMakeRangeOp(makeRange, warpId); else if (isa<tt::LoadOp, tt::DotOp, tt::AdvanceOp, tt::ReduceOp, - tt::SplatOp, tt::BroadcastOp, tt::ExpandDim...
Can both broadcast ops still occur?
intel-xpu-backend-for-triton
github_2023
cpp
2,180
intel
jopperm
@@ -751,6 +766,8 @@ class ConvertTritonToTritonGPUWarp } else if (isa<tt::SplatOp, tt::BroadcastOp, tt::ReduceOp, tt::MakeRangeOp>(def)) { chainedVals.insert(def->getResult(0)); + } else if (isa<tt::ExpandDimsOp>(def)) { + ;
Maybe add a comment why this is a no-op?
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -58,6 +58,7 @@ permissions: read-all env: TRITON_DISABLE_LINE_INFO: 1 TEST_UNSKIP: ${{ inputs.enable_unskip }} + GH_TOKEN: ${{ github.token }}
`GH_TOKEN` is not required to run tests. If `test-triton.sh` requires it, then the script needs to be refactored to not use it to just run tests.
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -37,8 +37,8 @@ on: branches: - llvm-target push: - branches: - - llvm-target + # branches: + # - llvm-target
Why this is commented out? If PR is not ready for merging it needs to marked as draft to avoid accidental merging,
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -270,7 +228,10 @@ jobs: - name: Pass rate run: | + set -x source ./scripts/capture-hw-details.sh + find $TRITON_TEST_REPORTS_DIR
Why is this needed?
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -270,7 +228,10 @@ jobs: - name: Pass rate run: | + set -x
This step is now overflown with bash output, do we really need `set -x`?
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -311,6 +315,26 @@ run_benchmark_attention() { python ${BENCHMARK_TEST_DIR}/flash_attention_fwd_benchmark.py } +run_instrumentation_tests() { + set -x + # FIXME: the "instrumentation" test suite currently contains only one test, when all tests + # are skipped pytest reports an error. If the only test is the ...
Out of curiosity, why `exit -1`?
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -115,8 +115,6 @@ jobs: - name: Create directory for tests reports run: | mkdir reports - echo "TRITON_TEST_REPORTS=true" >> $GITHUB_ENV - echo "TRITON_TEST_WARNING_REPORTS=true" >> $GITHUB_ENV
If you keep these environment variables, then you can skip specifying `--reports --warning-reports` for `test-triton.sh` in the steps below.
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -112,117 +112,46 @@ jobs: cd python lit -v build/*/test - - name: Create directory for tests reports + - name: Create test-triton command line run: | - mkdir reports - echo "TRITON_TEST_REPORTS=true" >> $GITHUB_ENV - echo "TRITON_TEST_WARNING_REPO...
Why there is no `--skip-...` option as in other steps?
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -112,117 +112,46 @@ jobs: cd python lit -v build/*/test - - name: Create directory for tests reports + - name: Create test-triton command line run: | - mkdir reports - echo "TRITON_TEST_REPORTS=true" >> $GITHUB_ENV - echo "TRITON_TEST_WARNING_REPO...
Why only `--skip-pip-install`? PyTorch should be installed at this moment already.
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -13,14 +18,17 @@ TEST_MICRO_BENCHMARKS=false TEST_BENCHMARK_SOFTMAX=false TEST_BENCHMARK_GEMM=false TEST_BENCHMARK_ATTENTION=false +TEST_INSTRUMENTATION=false VENV=false TRITON_TEST_REPORTS=false TRITON_TEST_WARNING_REPORTS=false TRITON_TEST_IGNORE_ERRORS=false -SKIP_DEPS=false +SKIP_PIP=false +SKIP_PYTORCH=f...
Not used.
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -77,19 +98,21 @@ for arg in "$@"; do TRITON_TEST_IGNORE_ERRORS=true shift ;; + --skip-list) + TRITON_TEST_SKIPLIST_DIR="$2" + shift 2 + ;; --help) - echo "Example usage: ./test-triton.sh [--core | --tutorial | --unit | --microbench | --softmax | --gemm | --attention |...
The list of command line options is not up to date.
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -106,59 +129,58 @@ if [ "$VENV" = true ]; then source .venv/bin/activate fi -SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -TRITON_PROJ="$BASE/intel-xpu-backend-for-triton" - +export SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" source ...
`TRITON_PROJ_BUILD` is required only for unit tests.
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -106,59 +129,58 @@ if [ "$VENV" = true ]; then source .venv/bin/activate fi -SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -TRITON_PROJ="$BASE/intel-xpu-backend-for-triton" - +export SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" source ...
Regression, this was moved to `run_unit_tests` in #2213.
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -106,59 +129,58 @@ if [ "$VENV" = true ]; then source .venv/bin/activate fi -SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -TRITON_PROJ="$BASE/intel-xpu-backend-for-triton" - +export SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" source ...
Regression, the list of dependencies has been moved to `requirements-test.txt` in #2213.
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -106,59 +129,58 @@ if [ "$VENV" = true ]; then source .venv/bin/activate fi -SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -TRITON_PROJ="$BASE/intel-xpu-backend-for-triton" - +export SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" source ...
Not needed, it is installed in `install_deps`.
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -106,59 +129,58 @@ if [ "$VENV" = true ]; then source .venv/bin/activate fi -SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -TRITON_PROJ="$BASE/intel-xpu-backend-for-triton" - +export SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" source ...
We want to keep the error message. When Triton is installed, for example, from wheels the `python/build` directory does not exist and unit tests cannot be run. A user needs to know that Triton must be built from sources to run unit tests.
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -271,18 +293,35 @@ run_benchmark_attention() { echo "Default path:" TRITON_INTEL_ADVANCED_PATH=0 \ - TRITON_INTEL_ENABLE_ADDRESS_PAYLOAD_OPT=1 \ - IGC_VISAOptions=" -enableBCR -nolocalra -printregusage -DPASTokenReduction -enableHalfLSC" \ - IGC_DisableLoopUnroll=1 \ - python $TRITON_PROJ/benchmarks/trit...
The error message does not make sense: if there is an error with `ls` then `SHARED_LIB_DIR` is not set and `err` prints ``` Could not find '' ```
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -106,59 +128,51 @@ if [ "$VENV" = true ]; then source .venv/bin/activate fi -SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -TRITON_PROJ="$BASE/intel-xpu-backend-for-triton" - +export SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
```suggestion SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" ```
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -106,59 +128,51 @@ if [ "$VENV" = true ]; then source .venv/bin/activate fi -SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -TRITON_PROJ="$BASE/intel-xpu-backend-for-triton" - +export SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" source ...
```suggestion TRITON_PROJ=$BASE/intel-xpu-backend-for-triton ```
intel-xpu-backend-for-triton
github_2023
python
2,183
intel
pbchekin
@@ -198,7 +202,9 @@ def print_json_stats(stats: ReportStats): def main(): """Main.""" args = create_argument_parser().parse_args() - stats = parse_reports(pathlib.Path(args.reports)) + skiplist_dir = args.skip_list if args.skip_list else os.getenv('TRITON_TEST_SKIPLIST_DIR', + ...
Since `skiplist_dir` is a path, i would recommend to use use `pathlib.Path` for it. ```suggestion skiplist_dir = args.skip_list if args.skip_list else os.getenv('TRITON_TEST_SKIPLIST_DIR', 'scripts/skiplist/default') stats = parse_reports(pa...
intel-xpu-backend-for-triton
github_2023
python
2,183
intel
pbchekin
@@ -72,7 +76,7 @@ def get_deselected(report_path: pathlib.Path) -> int: return len([line for line in f.readlines() if line and not line.startswith('#')]) -def parse_report(report_path: pathlib.Path) -> ReportStats: +def parse_report(report_path: pathlib.Path, skiplist_dir: str) -> ReportStats:
Use `pathlib.Path` instead `str`: ```suggestion def parse_report(report_path: pathlib.Path, skiplist_dir: pathlib.Path) -> ReportStats: ```
intel-xpu-backend-for-triton
github_2023
python
2,183
intel
pbchekin
@@ -58,12 +58,16 @@ def create_argument_parser() -> argparse.ArgumentParser: default='all', help='name of the test suite, default: %(default)s', ) + argument_parser.add_argument( + '--skip-list', + type=str, + help='an exclude list dir used in pass rate calculation, can be...
```suggestion def get_deselected(report_path: pathlib.Path, skiplist_dir: pathlib.Path) -> int: ```
intel-xpu-backend-for-triton
github_2023
python
2,183
intel
pbchekin
@@ -58,12 +58,16 @@ def create_argument_parser() -> argparse.ArgumentParser: default='all', help='name of the test suite, default: %(default)s', ) + argument_parser.add_argument( + '--skip-list', + type=str, + help='an exclude list dir used in pass rate calculation, can be...
```suggestion skiplist_path = skiplist_dir / f'{report_path.stem}.txt' ```
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -106,59 +128,51 @@ if [ "$VENV" = true ]; then source .venv/bin/activate fi -SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -TRITON_PROJ="$BASE/intel-xpu-backend-for-triton" - +export SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" source ...
This check must not be here, see #2187. The script should work for all test suites except `unit` and `instrumentation` even if `python/build` does not exist.
intel-xpu-backend-for-triton
github_2023
others
2,183
intel
pbchekin
@@ -97,11 +97,6 @@ jobs: repository: pytorch/pytorch ref: ${{ inputs.pytorch_ref }} - - name: Install test dependencies - run: | - pip install pytest pytest-xdist pytest-rerunfailures pytest-select pytest-timeout expecttest defusedxml
You still need to install `defusedxml`. It is required for `pass-rate.py`.
intel-xpu-backend-for-triton
github_2023
others
2,221
intel
pbchekin
@@ -184,7 +184,7 @@ build_triton() { pip install -vvv -e '.[build,tests]' # Copy compile_commands.json in the build directory (so that cland vscode plugin can find it). - cp $TRITON_PROJ_BUILD/"$(ls $TRITON_PROJ_BUILD)"/compile_commands.json $TRITON_PROJ/ + cp $(find $TRITON_PROJ_BUILD -name compile_commands....
This should also work: ```suggestion cp $TRITON_PROJ_BUILD/*/compile_commands.json $TRITON_PROJ/ ```
intel-xpu-backend-for-triton
github_2023
python
2,200
intel
ZzEeKkAa
@@ -112,6 +32,124 @@ def extract_kernels(funcs): return getattr(torch, return_mode)(times).item() +if USE_IPEX_OPTION:
Can we have definde two functions unconditionally let's say `do_bench_ipex` and `do_bench_no_ipex`. And define do_bench conditionally. It is to avoid waterfall code.
intel-xpu-backend-for-triton
github_2023
others
1,269
intel
etiotto
@@ -1,6 +1,5 @@ // RUN: triton-opt %s -split-input-file --convert-triton-intel-gpu-to-llvm | FileCheck %s -// CHECK-DAG: llvm.func spir_funccc @_Z27__spirv_ConvertFToBF16INTELf(f32) -> i16
Add the CHECK for the OpenCL function declaration `_Z32intel_convert_bfloat16_as_ushortf`. It would be useful to check that the SPIRV calling convention is on the function decl.
intel-xpu-backend-for-triton
github_2023
cpp
2,109
intel
Dewei-Wang-sh
@@ -793,14 +830,24 @@ void MatchTargetSizePass::transformReduceOp(tt::ReduceOp op) { int64_t outer = dims == 2 ? srcTy.getShape()[0] : 1; SmallVector<Value> glueVals; - unsigned step = 8; // FIXME: fixed to 8 for now. + // Fixed for reduce transpose.
can you put this to a separate function? the default way is not to use the transposed reduction.
intel-xpu-backend-for-triton
github_2023
cpp
2,109
intel
Dewei-Wang-sh
@@ -0,0 +1,23 @@ +//===- Utils.h - TritonIntelGPU Utils -----------------------------------*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---...
triton has a default method wrapper to get bool env.
intel-xpu-backend-for-triton
github_2023
cpp
2,109
intel
whitneywhtsang
@@ -551,6 +555,135 @@ class ReduceOpConversion : public ConvertTritonGPUOpToLLVMPattern<ReduceOp> { } }; +class TransposedReduceOpConversion + : public ConvertTritonGPUOpToLLVMPattern<ReduceOp> { +public: + using ConvertTritonGPUOpToLLVMPattern< + ReduceOp>::ConvertTritonGPUOpToLLVMPattern; + LogicalRes...
`TritonGEN::SubGroupShuffleOp` is removed.
intel-xpu-backend-for-triton
github_2023
cpp
2,109
intel
whitneywhtsang
@@ -805,7 +807,141 @@ Value MatchTargetSizePass::getSubVal(Operation *op, Value val, return dstVal; } +static Value hackAlloc(OpBuilder &b, Location loc, Type ptrTy, int64_t size) { + auto func = static_cast<FunctionOpInterface>( + &*b.getInsertionPoint() + ->getParentWithTrait<FunctionOpInterfac...
is it more robust to get subgroup size from module?