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
others
187
intel
whitneywhtsang
@@ -0,0 +1,32 @@ +# - Try to find SPIRV-LLVM-Translator
nit ```suggestion # Try to find SPIRV-LLVM-Translator. ```
intel-xpu-backend-for-triton
github_2023
cpp
184
intel
whitneywhtsang
@@ -262,8 +262,21 @@ class ConvertTritonGPUOpToLLVMPatternBase { Value getClusterCTAId(ConversionPatternRewriter &rewriter, Location loc) const { - return rewriter.create<triton::nvgpu::ClusterCTAIdOp>( - loc, rewriter.getI32Type()); + Value CTAId; + switch (target) { + ...
```suggestion switch (target) { case triton::Target::NVVM: return rewriter.create<triton::nvgpu::ClusterCTAIdOp>( loc, rewriter.getI32Type()); case triton::Target::ROCDL: case triton::Target::GENX: // Clusters of thread blocks aren't supported. return rewriter.create<...
intel-xpu-backend-for-triton
github_2023
others
143
intel
LiyangLingIntel
@@ -1,35 +1,45 @@ -# sed -i '/import torch/ a\import intel_extension_for_pytorch' ${HOME}/${JOB_WORKSPACE}/triton_src/python/test/unit/interpreter/test_interpreter.py -JOB_WORKSPACE=${1:-triton-preci} +SCRIPTS_ROOT_DIR=$(dirname $0) +TRITON_SRC_ROOT_DIR=$(realpath -- $SCRIPTS_ROOT_DIR/../../../..) -sed -i '/import to...
Could you please try to clean the duplicated commands, like ```shell for file in ${TRITON_SRC_ROOT_DIR}/python/test/unit/runtime/*.py; do sed -i '/import torch/ a\import intel_extension_for_pytorch' "$file" done ```
intel-xpu-backend-for-triton
github_2023
others
143
intel
LiyangLingIntel
@@ -1,35 +1,45 @@ -# sed -i '/import torch/ a\import intel_extension_for_pytorch' ${HOME}/${JOB_WORKSPACE}/triton_src/python/test/unit/interpreter/test_interpreter.py -JOB_WORKSPACE=${1:-triton-preci} +SCRIPTS_ROOT_DIR=$(dirname $0) +TRITON_SRC_ROOT_DIR=$(realpath -- $SCRIPTS_ROOT_DIR/../../../..) -sed -i '/import to...
Please make the quote `''' '''`, `' '`, `" "` in same style, like `' '` for outer, `" "` for inner.
intel-xpu-backend-for-triton
github_2023
cpp
142
intel
etiotto
@@ -42,4 +42,4 @@ bool linkExternLib(llvm::Module &module, llvm::StringRef name, } // namespace triton } // namespace mlir -#endif // TRITON_TARGET_LLVMIRTRANSLATION_H
We should keep the upstream change here.
intel-xpu-backend-for-triton
github_2023
others
142
intel
etiotto
@@ -831,7 +889,7 @@ section 9.7.13.4.1 for more details. ); let builders = [ - // Specially for MMAV1(Volta)
Undo unnecessary change
intel-xpu-backend-for-triton
github_2023
cpp
142
intel
etiotto
@@ -23,6 +23,7 @@ #include "../DotOpToLLVM.h" #include "../Utility.h" +#include "triton/Conversion/TritonGPUToLLVM/TritonGPUToLLVMPass.h"
Not sure why we need this.
intel-xpu-backend-for-triton
github_2023
cpp
142
intel
etiotto
@@ -285,7 +309,6 @@ struct CallOpConversion : public ConvertOpToLLVMPattern<triton::CallOp> { return success(); } -private:
Are we able to revert this line change ?
intel-xpu-backend-for-triton
github_2023
cpp
142
intel
etiotto
@@ -300,6 +323,9 @@ struct CallOpConversion : public ConvertOpToLLVMPattern<triton::CallOp> { callOp.getLoc(), /*opOperands=*/callOp->getOperands(), adaptor.getOperands(), rewriter); auto base = allocation.getFunctionSharedMemoryBase(caller); + if (!base) + base = rewriter.create<LLVM::Un...
Divergence from upstream code. Is this really necessary (are there any test that fails if we revert this change?).
intel-xpu-backend-for-triton
github_2023
cpp
142
intel
etiotto
@@ -388,8 +417,8 @@ struct ConvertTritonGPUToLLVM ConvertTritonGPUToLLVM>::ConvertTritonGPUToLLVMBase; void getDependentDialects(DialectRegistry &registry) const override { - registry.insert<triton::nvgpu::NVGPUDialect, LLVM::LLVMDialect, - NVVM::NVVMDialect>(); + registry.insert<GE...
[nit]: Move `GENX::GENXDialect` to the end
intel-xpu-backend-for-triton
github_2023
cpp
142
intel
etiotto
@@ -763,6 +822,7 @@ struct ConvertTritonGPUToLLVM // pipeline pass aware of the vectorization could introduce additional // dependencies on the AxisInfoAnalysis and the Coalesce analysis. bool decomposed = false; +
revert
intel-xpu-backend-for-triton
github_2023
cpp
142
intel
etiotto
@@ -158,3 +183,65 @@ Type TritonGPUToLLVMTypeConverter::convertTritonTensorType( SmallVector<Type, 4> types(numElementsPerThread, eltType); return LLVM::LLVMStructType::getLiteral(ctx, types); } + +TritonGPUToSPIRVTypeConverter::TritonGPUToSPIRVTypeConverter(
Do we need this class now ? Can you check?
intel-xpu-backend-for-triton
github_2023
cpp
142
intel
etiotto
@@ -4,7 +4,6 @@ #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h" #include "triton/Dialect/Triton/IR/AttrInterfaces.h.inc" #include "llvm/ADT/StringSwitch.h" -#include "llvm/ADT/TypeSwitch.h"
Put back
intel-xpu-backend-for-triton
github_2023
others
142
intel
etiotto
@@ -1,2 +1,3 @@ add_subdirectory(LLVMIR) add_subdirectory(PTX) +add_subdirectory(SPIRV)
Remove?
intel-xpu-backend-for-triton
github_2023
cpp
142
intel
etiotto
@@ -162,6 +163,7 @@ static void amendLLVMFunc(llvm::Function *func, const NVVMMetadata &metadata, })); SmallVector<llvm::Metadata *> md_args = {llvm::ValueAsMetadata::get(func)}; +
remove
intel-xpu-backend-for-triton
github_2023
cpp
142
intel
etiotto
@@ -369,26 +387,47 @@ bool linkExternLib(llvm::Module &module, llvm::StringRef name, return false; } +static void dumpLLVMIR(std::unique_ptr<llvm::Module> &llvmModule, + StringRef banner) { + if (::triton::tools::getBoolEnv("LLVM_IR_ENABLE_DUMP")) { + std::string mod_string; + std::un...
put back
intel-xpu-backend-for-triton
github_2023
python
142
intel
etiotto
@@ -0,0 +1,149 @@ +import sys
Need not be addressed in this pull request but it would be nice to avoid having XPU specific copies of upstream test files. Rather than doing that I would like for us to edit the existing upstream files directly with our changes. That way every time we merge from upstream we get new tests and we do not need to dual mai...
intel-xpu-backend-for-triton
github_2023
python
142
intel
etiotto
@@ -1075,7 +1075,6 @@ def kernel(X, Y, Z): for sem in [None, 'acquire', 'release', 'acq_rel', 'relaxed']])) def test_atomic_rmw(op, dtype_x_str, mode, sem, device): check_cuda_only(device) -
add back the line
intel-xpu-backend-for-triton
github_2023
python
142
intel
etiotto
@@ -350,4 +353,4 @@ def benchmark(M, N, K, provider): return perf(ms), perf(max_ms), perf(min_ms) -benchmark.run(show_plots=True, print_data=True) +# benchmark.run(show_plots=True, print_data=True)
Why commenting this line out ? Undo change.
intel-xpu-backend-for-triton
github_2023
others
132
intel
chengjunlu
@@ -28,7 +28,7 @@ else() # Default llvm package set(LLVM_DOWNLOAD_URL - https://github.com/intel/intel-xpu-backend-for-triton/releases/download/llvm_pkg_b1115f8c/llvm+mlir-18.0.0-x86_64-linux-gnu-ubuntu-18.04-release.tar.xz + https://github.com/intel/intel-xpu-backend-for-triton/releas...
Why extra `clang` in the package name? Please help to check. Remove un-used component in the package to reduce the package size.
intel-xpu-backend-for-triton
github_2023
others
110
intel
ESI-SYD
@@ -111,7 +111,7 @@ jobs: - name: Unit Test for triton on PVC run: | echo -e "[ INFO ] Run UT test on Node $(hostname)" - source ${HOME}/miniconda3/bin/activate triton-preci + source ${HOME}/miniconda3/bin/activate triton-nightly
should be `triton-nightly-test`
intel-xpu-backend-for-triton
github_2023
others
87
intel
chuanqi129
@@ -28,46 +28,30 @@ Simply run the model using the following sh file. Note that there are some trick -First, create a sh file called `single_run.sh` under the PyTorch source folder, then run using the following `sh` file with the command: +First, copy the sh file [intel_xpu_backend/.github/scripts/inductor_xpu_t...
remove `static 2 1`
intel-xpu-backend-for-triton
github_2023
others
87
intel
chuanqi129
@@ -28,46 +28,30 @@ Simply run the model using the following sh file. Note that there are some trick -First, create a sh file called `single_run.sh` under the PyTorch source folder, then run using the following `sh` file with the command: +First, copy the sh file [intel_xpu_backend/.github/scripts/inductor_xpu_t...
use `static 1 0` is better, for single model test, we don't need to split model list. You can try it.
intel-xpu-backend-for-triton
github_2023
others
103
intel
Stonepia
@@ -1,31 +1,31 @@ -# sed -i '/import torch/ a\import intel_extension_for_pytorch' ${TRITON_ROOT}/triton/python/test/unit/interpreter/test_interpreter.py -TRITON_ROOT=${HOME}/triton-preci +# sed -i '/import torch/ a\import intel_extension_for_pytorch' ${HOME}/${TRITON_ROOT}/triton/python/test/unit/interpreter/test_inter...
The `$TRITON_ROOT` from the semantic is like the **abs path** to the triton folder, but this script assumes that is the **relative path from the `HOME`**, which does not align with the intuition. Could we just accept the TRITON_ROOT whereby the user could run like below? In the script we don't need to assume the tri...
intel-xpu-backend-for-triton
github_2023
others
89
intel
chuanqi129
@@ -1,29 +1,29 @@ -# sed -i '/import torch/ a\import intel_extension_for_pytorch' ${HOME}/actions-runner/_work/intel-xpu-backend-for-triton/intel-xpu-backend-for-triton/triton/python/test/unit/interpreter/test_interpreter.py +# sed -i '/import torch/ a\import intel_extension_for_pytorch' ${HOME}/triton-preci/triton/pyt...
I saw we run this script in the triton UT root path, suggest to use the relative path instead of abs path, how do you think?
intel-xpu-backend-for-triton
github_2023
others
89
intel
chuanqi129
@@ -30,13 +38,23 @@ jobs: shell: bash run: | source ${HOME}/miniconda3/bin/activate triton-preci + cd ${HOME}/triton-preci + cd ${{ github.workspace }}
What's the value of `github.workspace` in here? why we need cd twice? if the value is `${HOME}/actions-runner/_work/intel-xpu-backend-for-triton/`, suggest to use this `github.workspace` as our test workspace directly, instead of `${HOME}/triton-preci`. For example ``` cd ${github.workspace} git clone https://github...
intel-xpu-backend-for-triton
github_2023
others
89
intel
chuanqi129
@@ -69,7 +79,8 @@ jobs: export LD_PRELOAD=$LD_PRELOAD:${CONDA_PREFIX}/lib/libtinfow.so.6 pip install pybind11 pip uninstall -y triton - cd triton/python + rm -rf ~/.triton/intel_llvm + cd ${HOME}/triton-preci/triton/python python setup.py clean ...
Change to `bdist_wheel` and try import in another path, just like e2e test workflow
intel-xpu-backend-for-triton
github_2023
others
89
intel
chuanqi129
@@ -69,7 +79,8 @@ jobs: export LD_PRELOAD=$LD_PRELOAD:${CONDA_PREFIX}/lib/libtinfow.so.6
Seems we don't need this lib anymore because we deleted 22.04 llvm package
intel-xpu-backend-for-triton
github_2023
others
89
intel
chuanqi129
@@ -63,6 +68,7 @@ jobs: source ${HOME}/env_triton.sh export LD_PRELOAD=$LD_PRELOAD:${CONDA_PREFIX}/lib/libtinfow.so.6
Same here
intel-xpu-backend-for-triton
github_2023
cpp
91
intel
EikanWang
@@ -180,7 +180,12 @@ struct LoadOpSPIRVConversion bitcast(ptrElems[vecStart], ptr_ty(retTy, spirv::StorageClass::CrossWorkgroup)); - Value ret = rewriter.create<spirv::LoadOp>(loc, ptrElem); + uint32_t alignment = 4 * nWords;
What's the exact mean of `4`? Does it mean 4 bytes? Could you please add some comments here to explain why we need this alignment.
intel-xpu-backend-for-triton
github_2023
python
105
intel
chengjunlu
@@ -453,6 +453,10 @@ def get_stream(self, idx=None): def get_device_properties(self, device): return self.driver.utils.get_device_properties(torch.xpu.device(device).sycl_device) # noqa: E501 + @functools.lru_cache(None) + def get_device_capability(self, device):
Use the get_device_properties instead.
intel-xpu-backend-for-triton
github_2023
python
105
intel
chengjunlu
@@ -470,10 +474,12 @@ def get_kernel_bin(self): return "spvbin" def get_architecture_descriptor(self, **kwargs): - dev_props = self.get_device_properties(self.get_current_device()) - max_work_group_size = dev_props['max_work_group_size'] - max_num_sub_groups = dev_props['max_num_sub...
Use the keyword "arch" to align the Triton code. The "cc" is dedicate for CUDA capability
intel-xpu-backend-for-triton
github_2023
python
105
intel
EikanWang
@@ -470,10 +470,12 @@ def get_kernel_bin(self): return "spvbin" def get_architecture_descriptor(self, **kwargs): - dev_props = self.get_device_properties(self.get_current_device()) - max_work_group_size = dev_props['max_work_group_size'] - max_num_sub_groups = dev_props['max_num_sub...
What is the behavior if the value is None?
intel-xpu-backend-for-triton
github_2023
others
97
intel
chuanqi129
@@ -0,0 +1,76 @@ +JOB_WORKSPACE=${1:-triton-preci} +TORCH_REPO=${2:-https://github.com/pytorch/pytorch.git} +TORCH_BRANCH=${3:-v2.0.1} +TORCH_COMMIT=${4:-e9ebda29d87ce0916ab08c06ab26fd3766a870e5} +IPEX_REPO=${5:-https://github.com/intel/intel-extension-for-pytorch.git} +IPEX_BRANCH=${6:-xpu-master} +IPEX_COMMIT=${7:-4a...
Seems also can use input param for IPEX, even just for get the torch patches
intel-xpu-backend-for-triton
github_2023
others
97
intel
chuanqi129
@@ -211,4 +245,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: Triton-ci-data - path: /home/sdp/actions-runner/_work/intel-xpu-backend-for-triton/intel-xpu-backend-for-triton/triton/python/test/unit/language/*.log + path: /home/sdp/triton-preci/triton/python/test/u...
I guess UT nightly also need such change @ESI-SYD
intel-xpu-backend-for-triton
github_2023
others
75
intel
LiyangLingIntel
@@ -0,0 +1,157 @@ +This recipe explains how to do kernel profiling using Intel® VTune™ Profiler. Normally, you use Intel® VTune™ Profiler for deeper understanding of kernel’s bottleneck and possible optimizing direction, while PyTorch profiler is used for the end-to-end model bottleneck. + +- [Server Setup](#server-set...
I found that we can start service with this command: `vtune-server --web-port=8080 --data-directory ./ --allow-remote-access --enable-server-profiling` With this I can skip "Where Setup" step which is always failing in my trial.
intel-xpu-backend-for-triton
github_2023
others
65
intel
chengjunlu
@@ -1,9 +1,62 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +set(XPU_BACKEND_RECURSIVE ON) + +if(XPU_BACKEND_RECURSIVE) +set(TRITON_BUILD_PYTHON_MODULE ON) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) # Tablegen'd file...
change comments
intel-xpu-backend-for-triton
github_2023
others
65
intel
chengjunlu
@@ -1,9 +1,62 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +set(XPU_BACKEND_RECURSIVE ON) + +if(XPU_BACKEND_RECURSIVE) +set(TRITON_BUILD_PYTHON_MODULE ON) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) # Tablegen'd file...
Skip the `LLVM_DIR`, `LLVM_INCLUDE_DIRS` and `LLVM_LIBRARY_DIR`
intel-xpu-backend-for-triton
github_2023
others
65
intel
chengjunlu
@@ -1,9 +1,62 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +set(XPU_BACKEND_RECURSIVE ON)
Need to check the LLVM version compatible.
intel-xpu-backend-for-triton
github_2023
others
65
intel
chuanqi129
@@ -54,7 +54,7 @@ jobs: run: | source ${HOME}/miniconda3/bin/activate triton-nightly-test source ${HOME}/env_triton.sh - export LLVM_SYSPATH=${HOME}/triton-nightly/llvm/build/ + export TRITON_INTEL_LLVM_DIR=${HOME}/triton-preci/llvm/
please change to `triton-nightly`
intel-xpu-backend-for-triton
github_2023
others
65
intel
chuanqi129
@@ -1,9 +1,104 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +if (DEFINED ENV{TRITON_INTEL_LLVM_DIR}) +MESSAGE(STATUS "[intel_xpu_backend]: using TRITON_INTEL_LLVM_DIR") + +# set_target_properties(SPIRV-Tools-shared PROPERTIES EXCLUDE_FROM_ALL ON) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/llv...
Where is the default llvm for triton downloaded? Can we put them under same parent folder as default? If so, I guess we can have a default value for `TRITON_INTEL_LLVM_DIR`, how do you think?
intel-xpu-backend-for-triton
github_2023
others
65
intel
chengjunlu
@@ -1,9 +1,104 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +if (DEFINED ENV{TRITON_INTEL_LLVM_DIR}) +MESSAGE(STATUS "[intel_xpu_backend]: using TRITON_INTEL_LLVM_DIR") + +# set_target_properties(SPIRV-Tools-shared PROPERTIES EXCLUDE_FROM_ALL ON) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/llv...
1. Download LLVM only needed 2. Download LLVM into triton cache director like the triton.
intel-xpu-backend-for-triton
github_2023
others
78
intel
chuanqi129
@@ -24,10 +24,36 @@ SOURCE_DIR ${TRITON_INTEL_LLVM_DIR} FetchContent_Populate(intel-llvm) endfunction(download_file) +set(LLVM_DOWNLOAD_URL https://github.com/intel/intel-xpu-backend-for-triton/releases/download/llvm_pkg_v0.1/llvm+mlir-17.0.0-x86_64-linux-gnu-ubuntu-18.04-release.tar.xz) +set(OS_INFO_FILE "/etc/os-...
```suggestion MESSAGE(STATUS "[intel_xpu_backend]: Triton uses LLVM version ${LLVM_PACKAGE_VERSION} with revision ${LLVM_GIT_REVISION}") ```
intel-xpu-backend-for-triton
github_2023
others
78
intel
chuanqi129
@@ -24,10 +24,36 @@ SOURCE_DIR ${TRITON_INTEL_LLVM_DIR} FetchContent_Populate(intel-llvm) endfunction(download_file) +set(LLVM_DOWNLOAD_URL https://github.com/intel/intel-xpu-backend-for-triton/releases/download/llvm_pkg_v0.1/llvm+mlir-17.0.0-x86_64-linux-gnu-ubuntu-18.04-release.tar.xz) +set(OS_INFO_FILE "/etc/os-...
```suggestion MESSAGE(STATUS "[intel_xpu_backend]: Use the LLVM version with revision to re-config for the intel_xpu_backend") ```
intel-xpu-backend-for-triton
github_2023
others
78
intel
chuanqi129
@@ -24,10 +24,36 @@ SOURCE_DIR ${TRITON_INTEL_LLVM_DIR} FetchContent_Populate(intel-llvm) endfunction(download_file) +set(LLVM_DOWNLOAD_URL https://github.com/intel/intel-xpu-backend-for-triton/releases/download/llvm_pkg_v0.1/llvm+mlir-17.0.0-x86_64-linux-gnu-ubuntu-18.04-release.tar.xz) +set(OS_INFO_FILE "/etc/os-...
We'd better to print the download link in message
intel-xpu-backend-for-triton
github_2023
python
44
intel
chengjunlu
@@ -6,6 +6,7 @@ import warnings from typing import List +import intel_extension_for_pytorch
Not to import IPEX at global
intel-xpu-backend-for-triton
github_2023
python
44
intel
chengjunlu
@@ -463,16 +433,8 @@ def get_onemkl_libraries(self): ] -def get_pytorch_include_dir(): - lib_include = os.path.join(_TORCH_PATH, "include") - paths = [ - lib_include, - # Remove this once torch/torch.h is officially no longer supported for C++ extensions. - os.path.join(lib_inclu...
try to import IPEX here
intel-xpu-backend-for-triton
github_2023
python
44
intel
chengjunlu
@@ -491,19 +453,12 @@ def include_paths() -> List[str]: if use_profile(): # add pytorch include directories paths = [] - paths += get_pytorch_include_dir() + paths += get_pytorch_ipex_onemkl_include_dir() # add oneAPI include directories paths += get_one_api_help...
import pybind11
intel-xpu-backend-for-triton
github_2023
python
44
intel
chengjunlu
@@ -6,6 +6,7 @@ import warnings from typing import List +import intel_extension_for_pytorch import pybind11 # noqa: F401
Not to import un-necessary module at global
intel-xpu-backend-for-triton
github_2023
python
44
intel
chengjunlu
@@ -420,25 +405,12 @@ def get_dpcpp_include_dir(self): os.path.join(self.__dpcpp_root, "linux", "include", "sycl"), ] - def get_onemkl_include_dir(self): - return [os.path.join(self.__onemkl_root, "include")] - def get_onednn_include_dir(self):
remove onednn.
intel-xpu-backend-for-triton
github_2023
python
44
intel
chengjunlu
@@ -448,9 +420,7 @@ def get_library_dirs(self): def get_include_dirs(self): include_dirs = [] include_dirs += [f"{x}" for x in self.get_dpcpp_include_dir()] - include_dirs += [f"{x}" for x in self.get_onemkl_include_dir()] include_dirs += [f"{x}" for x in self.get_onednn_include_d...
remove onemkl
intel-xpu-backend-for-triton
github_2023
python
44
intel
chengjunlu
@@ -491,19 +403,13 @@ def include_paths() -> List[str]: if use_profile(): # add pytorch include directories paths = [] - paths += get_pytorch_include_dir() + paths += get_pytorch_ipex_onemkl_include_dir() # add oneAPI include directories paths += get_one_api_help...
Use the try catch to capture the import error.
intel-xpu-backend-for-triton
github_2023
others
81
intel
chuanqi129
@@ -130,3 +124,9 @@ jobs: echo -e "[ERROR] Inductor E2E CI test for HF amp_fp16 inference passed_num < 45" exit 1 fi +
Why we need this change? if the test failed to the check, then the test results can't be upload. Suggest to upload the test results before than the exit.
intel-xpu-backend-for-triton
github_2023
others
81
intel
chuanqi129
@@ -148,3 +154,41 @@ jobs: echo -e "[ERROR] Inductor E2E Nightly test for HF amp_fp16 training passed_num < 42" exit 1 fi + + - name: Upload Triton Inductor E2E Nightly Data + uses: actions/upload-artifact@v3 + with: + name: Triton-Inductor-E2E-Nightly-Da...
TODO: add latency and compilation time regression check in the future
intel-xpu-backend-for-triton
github_2023
others
81
intel
Stonepia
@@ -57,6 +57,7 @@ jobs: run: | source ${HOME}/miniconda3/bin/activate triton-preci source ${HOME}/env_triton.sh + export LD_PRELOAD=$LD_PRELOAD:/home/gta/miniconda3/envs/triton-preci/lib/libtinfow.so.6
Could you change the `/home/gta/miniconda3/envs/triton-preci` to `${CONDA_PREFIX}` for more general user cases?
intel-xpu-backend-for-triton
github_2023
others
81
intel
Stonepia
@@ -54,6 +54,7 @@ jobs: run: | source ${HOME}/miniconda3/bin/activate triton-nightly-test source ${HOME}/env_triton.sh + export LD_PRELOAD=$LD_PRELOAD:/home/gta/miniconda3/envs/triton-nightly-test/lib/libtinfow.so.6
same as before
intel-xpu-backend-for-triton
github_2023
others
80
intel
chuanqi129
@@ -0,0 +1,230 @@ +#!/usr/bin/env bash +# +# Please review the system requirements before running this script +# https://intel.github.io/intel-extension-for-pytorch/xpu/latest/tutorials/installation.html +# +set -ueo pipefail + +#VER_LLVM="triton_debug" +#VER_PYTORCH="v2.0.1" +VER_TORCHVISION="v0.15.2" +VER_TORCHAUDIO=...
Seems it's not the latest version script? we use xpu-master, and checkout to the latest commit to get all needed pytorch patches
intel-xpu-backend-for-triton
github_2023
others
71
intel
riverliuintel
@@ -1,44 +1,44 @@ -# Intel® XPU Backend for Triton\* +# XPU Backend for Triton\* -This is the development repository of Intel® XPU Backend for Triton\*, a new [OpenAI Triton](https://github.com/openai/triton) backend for Intel® GPUs. Triton is a language and compiler for writing highly efficient custom Deep-Learning ...
Intel® XPU to Intel XPU
intel-xpu-backend-for-triton
github_2023
others
71
intel
riverliuintel
@@ -1,44 +1,44 @@ -# Intel® XPU Backend for Triton\*
Just keep Intel® XPU Backend for Triton\*, until got further clarification.
intel-xpu-backend-for-triton
github_2023
others
71
intel
riverliuintel
@@ -5,15 +5,15 @@ - [Detail for commands](#detail-for-commands) - [Debugging Tips](#debugging-tips) - [Profiling](#profiling) - - [E2E Tests Setting:](#e2e-tests-setting) + - [End-to-end Tests Setting:](#end-to-end-tests-setting) - [Profiling Settings](#profiling-settings) - [Profiling Tips...
Intel® XPU -> Intel XPU
intel-xpu-backend-for-triton
github_2023
others
59
intel
chuanqi129
@@ -28,7 +28,7 @@ fi ulimit -n 1048576 if [[ $DT == "amp_bf16" ]] || [[ $DT == "amp_fp16" ]]; then
If we extend the amp as amp_bf16 and amp_fp16, we can add the env var `INDUCTOR_AMP_DT` into this scripts also, and move it from test cmd.
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,92 @@ +name: Nightly Tests
Change to `Inductor E2E CI Tests`
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,92 @@ +name: Nightly Tests + +on: + workflow_dispatch: + schedule: + - cron: "0 8,11 * * *" + +jobs: + + Nightly-Tests:
Same here
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,92 @@ +name: Nightly Tests + +on: + workflow_dispatch: + schedule: + - cron: "0 8,11 * * *"
Change to PR trigger firstly
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,92 @@ +name: Nightly Tests + +on: + workflow_dispatch: + schedule: + - cron: "0 8,11 * * *" + +jobs: + + Nightly-Tests: + runs-on: [self-hosted, PVC_E2E] + + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/activate trito...
We don't need run pre_commit in inductor e2e test
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,92 @@ +name: Nightly Tests + +on: + workflow_dispatch: + schedule: + - cron: "0 8,11 * * *" + +jobs: + + Nightly-Tests: + runs-on: [self-hosted, PVC_E2E] + + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/activate trito...
Change to `Triton source code prepare`
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,92 @@ +name: Nightly Tests + +on: + workflow_dispatch: + schedule: + - cron: "0 8,11 * * *" + +jobs: + + Nightly-Tests: + runs-on: [self-hosted, PVC_E2E] + + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/activate trito...
uncomment those 2 lines, and move line 29 - 30 after line 36
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,92 @@ +name: Nightly Tests + +on: + workflow_dispatch: + schedule: + - cron: "0 8,11 * * *" + +jobs: + + Nightly-Tests: + runs-on: [self-hosted, PVC_E2E] + + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/activate trito...
we need run them in parallel on different cards
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,92 @@ +name: Nightly Tests + +on: + workflow_dispatch: + schedule: + - cron: "0 8,11 * * *" + +jobs: + + Nightly-Tests: + runs-on: [self-hosted, PVC_E2E] + + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/activate trito...
Add simple results check step for now, AMP_BF16 acc pass model number is 44, AMP_FP16 acc pass model number is 45
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,124 @@ +name: Inductor E2E CI Tests + +on: + workflow_dispatch: + pull_request: + branches: + - main + +jobs: + + Inductor-E2E-CI-Tests: + + runs-on: [self-hosted, PVC_E2E] + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/activate ...
Show the results summary firstly and move the check at the end of this step together
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,124 @@ +name: Inductor E2E CI Tests + +on: + workflow_dispatch: + pull_request: + branches: + - main + +jobs: + + Inductor-E2E-CI-Tests: + + runs-on: [self-hosted, PVC_E2E] + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/activate ...
For CI workflow please use PR commit, just like UT CI workflow
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,124 @@ +name: Inductor E2E CI Tests + +on: + workflow_dispatch: + pull_request: + branches: + - main + +jobs: + + Inductor-E2E-CI-Tests: + + runs-on: [self-hosted, PVC_E2E] + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/activate ...
align with UT workflow Use CI conda env
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,122 @@ +name: Inductor E2E Nightly Tests + +on: + workflow_dispatch: + schedule: + - cron: "0 8,11 * * *" + +jobs: + + Inductor-E2E-Nightly-Tests: + + runs-on: [self-hosted, PVC_E2E] + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/acti...
Add 2 AMP training test together, you can don't check training pass number, just let it run, we can add the pass check logic for training part later
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,122 @@ +name: Inductor E2E Nightly Tests + +on: + workflow_dispatch: + schedule: + - cron: "0 8,11 * * *" + +jobs: + + Inductor-E2E-Nightly-Tests: + + runs-on: [self-hosted, PVC_E2E] + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/acti...
Remove this line, in nightly, we always try to use latest main commit of triton
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,122 @@ +name: Inductor E2E Nightly Tests + +on: + workflow_dispatch: + schedule: + - cron: "0 8,11 * * *" + +jobs: + + Inductor-E2E-Nightly-Tests: + + runs-on: [self-hosted, PVC_E2E] + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/acti...
same with ci
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,125 @@ +name: Inductor E2E CI Tests + +on: + workflow_dispatch: + pull_request: + branches: + - main + +jobs: + + Inductor-E2E-CI-Tests: + + runs-on: [self-hosted, PVC_E2E] + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/activate ...
where the patch come from? I suppose you need put this patch into a place in this node and cp to here
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,129 @@ +name: Inductor E2E CI Tests + +on: + workflow_dispatch: + pull_request: + branches: + - main + +jobs: + + Inductor-E2E-CI-Tests: + + runs-on: [self-hosted, PVC_E2E] + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/activate ...
Because we changed to install wheel, so we can't try import triton under `triton/python` folder now, please update
intel-xpu-backend-for-triton
github_2023
others
51
intel
chuanqi129
@@ -0,0 +1,130 @@ +name: Inductor E2E CI Tests + +on: + workflow_dispatch: + pull_request: + branches: + - main + +jobs: + + Inductor-E2E-CI-Tests: + + runs-on: [self-hosted, PVC_E2E] + + steps: + + - name: Create conda environment + run: | + source ${HOME}/miniconda3/bin/activate ...
please remove the limitation of the test model, and put this `inductor_xpu_test.sh` scripts into `.github/scripts` also
intel-xpu-backend-for-triton
github_2023
others
36
intel
chengjunlu
@@ -1,6 +1,51 @@ # Intel® XPU Backend for Triton\* -This is the development repository of Intel® XPU Backend for Triton\*, a new [OpenAI Triton](https://github.com/openai/triton) backend for Intel® GPUs. Triton is a language and compiler for writing highly efficient custom Deep-Learning primitives. The aim of Triton...
no IPEX for building.
intel-xpu-backend-for-triton
github_2023
others
36
intel
chengjunlu
@@ -1,6 +1,51 @@ # Intel® XPU Backend for Triton\* -This is the development repository of Intel® XPU Backend for Triton\*, a new [OpenAI Triton](https://github.com/openai/triton) backend for Intel® GPUs. Triton is a language and compiler for writing highly efficient custom Deep-Learning primitives. The aim of Triton...
The name `tests.md` is not good. `HowToRun` better?
intel-xpu-backend-for-triton
github_2023
others
36
intel
chuanqi129
@@ -0,0 +1,165 @@ +- [Overview](#overview) +- [Pre-Request](#pre-request) +- [Use the Hugging Face model](#use-the-hugging-face-model) + - [TL;DR](#tldr) +- [Detail for commands](#detail-for-commands) + - [Debugging Tips](#debugging-tips) + - [Profiling](#profiling) + + +# Overview +This doc contains [Torchdynamo ...
For this stage, we focus on static shape, I think we can remove SHAPE param
intel-xpu-backend-for-triton
github_2023
others
36
intel
chuanqi129
@@ -0,0 +1,165 @@ +- [Overview](#overview) +- [Pre-Request](#pre-request) +- [Use the Hugging Face model](#use-the-hugging-face-model) + - [TL;DR](#tldr) +- [Detail for commands](#detail-for-commands) + - [Debugging Tips](#debugging-tips) + - [Profiling](#profiling) + + +# Overview +This doc contains [Torchdynamo ...
Also remove this `Shape_extra` part
intel-xpu-backend-for-triton
github_2023
others
36
intel
chuanqi129
@@ -0,0 +1,165 @@ +- [Overview](#overview) +- [Pre-Request](#pre-request) +- [Use the Hugging Face model](#use-the-hugging-face-model) + - [TL;DR](#tldr) +- [Detail for commands](#detail-for-commands) + - [Debugging Tips](#debugging-tips) + - [Profiling](#profiling) + + +# Overview +This doc contains [Torchdynamo ...
Change `Python` to `Bash`
intel-xpu-backend-for-triton
github_2023
others
36
intel
chuanqi129
@@ -0,0 +1,165 @@ +- [Overview](#overview) +- [Pre-Request](#pre-request) +- [Use the Hugging Face model](#use-the-hugging-face-model) + - [TL;DR](#tldr) +- [Detail for commands](#detail-for-commands) + - [Debugging Tips](#debugging-tips) + - [Profiling](#profiling) + + +# Overview +This doc contains [Torchdynamo ...
Same here
intel-xpu-backend-for-triton
github_2023
others
36
intel
chuanqi129
@@ -0,0 +1,165 @@ +- [Overview](#overview) +- [Pre-Request](#pre-request) +- [Use the Hugging Face model](#use-the-hugging-face-model) + - [TL;DR](#tldr) +- [Detail for commands](#detail-for-commands) + - [Debugging Tips](#debugging-tips) + - [Profiling](#profiling) + + +# Overview +This doc contains [Torchdynamo ...
For this part, it will be better to add the profiling method in generally. And take Toyrchdynamo benchmark scripts as an example, how to do the profiling correspondingly . How do you think?
intel-xpu-backend-for-triton
github_2023
others
36
intel
EikanWang
@@ -1,6 +1,54 @@ # Intel® XPU Backend for Triton\* -This is the development repository of Intel® XPU Backend for Triton\*, a new [OpenAI Triton](https://github.com/openai/triton) backend for Intel® GPUs. Triton is a language and compiler for writing highly efficient custom Deep-Learning primitives. The aim of Triton...
Remove `third-party`
intel-xpu-backend-for-triton
github_2023
others
36
intel
EikanWang
@@ -1,6 +1,54 @@ # Intel® XPU Backend for Triton\* -This is the development repository of Intel® XPU Backend for Triton\*, a new [OpenAI Triton](https://github.com/openai/triton) backend for Intel® GPUs. Triton is a language and compiler for writing highly efficient custom Deep-Learning primitives. The aim of Triton...
ditto
intel-xpu-backend-for-triton
github_2023
cpp
53
intel
chengjunlu
@@ -87,13 +86,17 @@ struct ReduceOpSPIRVConversion void getWriteIndexBasic(ConversionPatternRewriter &rewriter, Location loc, Attribute layout, SmallVector<Value> &index, SmallVector<Value> &writeIdx, - std::map<int, Value> &ints, unsigne...
Remove debug code.
intel-xpu-backend-for-triton
github_2023
python
40
intel
chengjunlu
@@ -101,8 +101,9 @@ def _extracted_type_pybind11(ty): 'fp64': 'double', }[ty] + if os.getenv("TRITON_XPU_PROFILE").lower() == 'on' # Ipex available src - ipex_src = f""" + return f"""
This is format string in Python. You can use the {PROFILE_STUB} instead of copy-paste. The represent of the PROFILE_STUB would be replaced in place in the string.
intel-xpu-backend-for-triton
github_2023
python
40
intel
chengjunlu
@@ -263,15 +264,179 @@ def _extracted_type_pybind11(ty): """ - return ipex_src + else: + return f""" +#include <pybind11/pybind11.h> +#include <sycl/sycl.hpp> +#include <cstdlib> + +namespace py = pybind11; + +namespace {{ + +bool getBoolEnv(const std::string &env) {{ + const char *s = std::get...
Unified the two extensions.
intel-xpu-backend-for-triton
github_2023
python
40
intel
chengjunlu
@@ -0,0 +1,352 @@ +import copy +import os +import setuptools +import shutil +import sys +import errno + +from typing import List + +from setuptools.command.build_ext import build_ext + +IS_WINDOWS = sys.platform == "win32" +SHARED_FLAG = "/DLL" if IS_WINDOWS else "-shared" +SYCL_FLAG = "-fsycl" + +COMMON_DPCPP_FLAGS = ...
Clean up the un-reachable code.
intel-xpu-backend-for-triton
github_2023
python
40
intel
chengjunlu
@@ -0,0 +1,352 @@ +import copy +import os +import setuptools +import shutil +import sys +import errno + +from typing import List + +from setuptools.command.build_ext import build_ext + +IS_WINDOWS = sys.platform == "win32" +SHARED_FLAG = "/DLL" if IS_WINDOWS else "-shared" +SYCL_FLAG = "-fsycl" + +COMMON_DPCPP_FLAGS = ...
Do we have to use the `icpx`?
intel-xpu-backend-for-triton
github_2023
python
40
intel
chengjunlu
@@ -0,0 +1,352 @@ +import copy +import os +import setuptools +import shutil +import sys +import errno + +from typing import List + +from setuptools.command.build_ext import build_ext + +IS_WINDOWS = sys.platform == "win32" +SHARED_FLAG = "/DLL" if IS_WINDOWS else "-shared" +SYCL_FLAG = "-fsycl" + +COMMON_DPCPP_FLAGS = ...
dnnl library is not required.
intel-xpu-backend-for-triton
github_2023
python
40
intel
chengjunlu
@@ -0,0 +1,352 @@ +import copy +import os +import setuptools +import shutil +import sys +import errno + +from typing import List + +from setuptools.command.build_ext import build_ext + +IS_WINDOWS = sys.platform == "win32" +SHARED_FLAG = "/DLL" if IS_WINDOWS else "-shared" +SYCL_FLAG = "-fsycl" + +COMMON_DPCPP_FLAGS = ...
only sycl library is required I think
intel-xpu-backend-for-triton
github_2023
python
40
intel
chengjunlu
@@ -0,0 +1,352 @@ +import copy +import os +import setuptools +import shutil +import sys +import errno + +from typing import List + +from setuptools.command.build_ext import build_ext + +IS_WINDOWS = sys.platform == "win32" +SHARED_FLAG = "/DLL" if IS_WINDOWS else "-shared" +SYCL_FLAG = "-fsycl" + +COMMON_DPCPP_FLAGS = ...
Not to hard code the Python environment path.
intel-xpu-backend-for-triton
github_2023
python
40
intel
chengjunlu
@@ -11,13 +13,16 @@ from intel_extension_for_pytorch.xpu.cpp_extension import (DpcppBuildExtension, DPCPPExtension) -import triton._C.libintel_xpu_backend_for_triton.triton as _triton -from triton._C.libtriton.triton import add_external_libs -from triton.co...
Why need this? could `.extensions` work?
intel-xpu-backend-for-triton
github_2023
others
40
intel
chengjunlu
@@ -62,4 +62,8 @@ if(TRITON_BUILD_PYTHON_MODULE) file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py DESTINATION ${PYTHON_THIRD_PARTY_PATH}/xpu/) + + file(INSTALL + ${CMAKE_CURRENT_SOURCE_DIR}/extensions.py
Combine this line to the line 63
intel-xpu-backend-for-triton
github_2023
python
40
intel
chengjunlu
@@ -175,7 +179,9 @@ def _extracted_type_pybind11(ty): static void sycl_kernel_launch(int gridX, int gridY, int gridZ, int num_warps, int threads_per_warp, int shared_memory, sycl::queue& stream, sycl::kernel& kernel_ptr, {arg_decls}) {{ std::string kernel_name = kernel_ptr.get_info<sycl::info::kernel::function_na...
It seems you need to use the `#ifdef`
intel-xpu-backend-for-triton
github_2023
python
40
intel
chengjunlu
@@ -261,17 +268,21 @@ def _extracted_type_pybind11(ty): }}); }} -""" - - return ipex_src
why this removed?
intel-xpu-backend-for-triton
github_2023
python
40
intel
chengjunlu
@@ -261,17 +268,21 @@ def _extracted_type_pybind11(ty): }}); }} -""" - - return ipex_src +""" # noqa: E501 def _build_xpu_ext(name, src, srcdir): + current_build_extension = SYCLBuildExtension + current_extension = SYCLExtension + if os.getenv("TRITON_XPU_PROFILE") is not None and os.getenv("T...
Can we totally remove the DpcppBuildExtension?