This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- a/dnn-providers/hip-kernel-provider/rocke/platform/cpp/core/lower_llvm/core.cpp | |
| +++ b/dnn-providers/hip-kernel-provider/rocke/platform/cpp/core/lower_llvm/core.cpp | |
| @@ -277,6 +277,7 @@ | |
| return found; | |
| } | |
| +#ifndef _WIN32 /* POSIX-only: used solely by the dirent scans below */ | |
| /* Python runtime_coexistence._version_key, as a comparison: compare the runs of | |
| * digits in each name as an integer sequence so "rocm-7.10" sorts NEWER than | |
| * "rocm-7.2" (a plain strcmp gets this backwards, because '1' < '2'). Returns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Which kernels changed between two PR heads? Instruments the suite's own _lower | |
| # to dump IR, runs it at both heads, and diffs. Catches collateral damage from a | |
| # "small fix" that touches many production files. | |
| # | |
| # Env: OLD_SRC, OLD_BUILD, NEW_SRC, NEW_BUILD, PYDEPS | |
| : "${OLD_SRC:?}"; : "${NEW_SRC:?}" | |
| instrument(){ python3 - "$1" "$2" <<'PY' | |
| import pathlib, sys | |
| d, tag = sys.argv[1], sys.argv[2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """Emit IR from BOTH rocke engines for the affected cases. Writes $ROCKE_WORK/repro2/*.ll | |
| Env: ROCKE_WORK with subdirs src/ (rocke/platform @ f19a5b09) build/ (rocke_engine*.so) | |
| """ | |
| import os, sys | |
| W = os.environ["ROCKE_WORK"] | |
| sys.path.insert(0, f"{W}/build"); sys.path.insert(0, f"{W}/src/python") | |
| import rocke_engine | |
| from rocke.core.ir import IRBuilder, PtrType, F16, I32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Build the rocke C++ engine + pybind extension from PR #9583 head. | |
| # Env: ROCKE_SRC = <checkout>/dnn-providers/hip-kernel-provider/rocke/platform | |
| # OUT = build output dir | |
| set -eo pipefail | |
| ROCKE_SRC="${ROCKE_SRC:?set ROCKE_SRC to .../rocke/platform}" | |
| OUT="${OUT:-/tmp/rocke_build}" | |
| PYDEPS="${PYDEPS:-/tmp/rocke_pydeps}" | |
| export PYTHONPATH="$PYDEPS:$PYTHONPATH" |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [CKBatchedGemmOperation(a_layout='Row', b_layout='Col', ds_layouts=(), c_layout='Row', a_element_dtype='F8', b_element_dtype='F8', ds_element_dtypes=(), c_element_dtype='BF16', acc_dtype='F32', c_shuffle_dtype='BF16', a_elementwise_op='PassThrough', b_elementwise_op='PassThrough', c_elementwise_op='PassThrough', gemm_specialization='GemmSpecialization::Default', block_size=256, m_per_block=256, n_per_block=256, k_per_block=64, a_k1=16, b_k1=16, m_per_xdl=32, n_per_xdl=32, m_xdl_per_wave=4, n_xdl_per_wave=4, a_block_transfer_thread_cluster_lengths_ak0_m_ak1=(4, 64, 1), a_block_transfer_thread_cluster_arrange_order=(1, 0, 2), a_block_transfer_src_access_order=(1, 0, 2), a_block_transfer_src_vector_dim=2, a_block_transfer_src_scalar_per_vector=16, a_block_transfer_dst_scalar_per_vector_ak1=16, a_block_lds_extra_m=0, b_block_transfer_thread_cluster_lengths_bk0_n_bk1=(4, 64, 1), b_block_transfer_thread_cluster_arrange_order=(1, 0, 2), b_block_transfer_src_access_order=(1, 0, 2), b_block_transfer_src_vector_dim=2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Edit this configuration file to define what should be installed on | |
| # your system. Help is available in the configuration.nix(5) man page | |
| # and in the NixOS manual (accessible by running ‘nixos-help’). | |
| { config, pkgs, ... }: | |
| let | |
| nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" '' | |
| export __NV_PRIME_RENDER_OFFLOAD=1 | |
| export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ait | |
| channels: | |
| - pytorch | |
| - nvidia | |
| - conda-forge | |
| - defaults | |
| dependencies: | |
| - _libgcc_mutex=0.1=conda_forge | |
| - _openmp_mutex=4.5=2_gnu | |
| - binutils_impl_linux-64=2.38=h2a08ee3_1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "channels": [ | |
| "intel", | |
| "defaults" | |
| ], | |
| "dependencies": [ | |
| "_libgcc_mutex=0.1=main", | |
| "_pytorch_select=0.2=gpu_0", | |
| "absl-py=0.8.1=py36_0", | |
| "asn1crypto=0.24.0=py36_3", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TORCH_VER="20191208" | |
| pip uninstall -y torch torchvision | |
| rm -r wheels | |
| mkdir -p wheels | |
| for f in {torch,torch_xla,torchvision}; do | |
| whl="${f}-nightly+${TORCH_VER}-cp36-cp36m-linux_x86_64.whl"; | |
| gsutil cp "gs://tpu-pytorch/wheels/${whl}" wheels/; | |
| pip install "wheels/${whl}"; | |
| done | |
| apt-get install -y libomp5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MUniquePointerPrinter: | |
| """ Print a unique_ptr with pointed-to-value | |
| credits: https://gcc.gnu.org/ml/libstdc++/2013-04/msg00098.html | |
| """ | |
| def __init__ (self, typename, val): | |
| self.val = val | |
| def to_string (self): | |
| v = self.val['_M_t']['_M_head_impl'] |
NewerOlder