CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
46 lines
1.2 KiB
Bash
Executable File
46 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
#usage : hipconvertinplace-perl.sh DIRNAME [-filter=all|headers|sources|custom] [hipify-perl options]
|
|
|
|
#hipify "inplace" all code files in specified directory.
|
|
# This can be quite handy when dealing with an existing CUDA code base since the script
|
|
# preserves the existing directory structure.
|
|
|
|
# For each code file, this script will:
|
|
# - If ".prehip file does not exist, copy the original code to a new file with extension ".prehip". Then hipify the code file.
|
|
# - If ".prehip" file exists, this is used as input to hipify.
|
|
# (this is useful for testing improvements to the hipify-perl toolset).
|
|
|
|
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
|
|
SCRIPT_NAME=findcode.sh
|
|
if [ "$#" -eq 0 ]; then
|
|
SEARCH_DIR=.
|
|
else
|
|
SEARCH_DIR=$1
|
|
if [ "$2" = "-filter=all" ]
|
|
then
|
|
shift
|
|
elif [ "$2" = "-filter=headers" ]
|
|
then
|
|
SCRIPT_NAME=findcode_headers.sh
|
|
shift
|
|
elif [ "$2" = "-filter=sources" ]
|
|
then
|
|
SCRIPT_NAME=findcode_sources.sh
|
|
shift
|
|
elif [ "$2" = "-filter=custom" ]
|
|
then
|
|
SCRIPT_NAME=findcode_custom.sh
|
|
shift
|
|
fi
|
|
shift
|
|
SEARCH_DIR=${SEARCH_DIR:-.}
|
|
fi
|
|
|
|
mapfile -d '' -t files < <("$SCRIPT_DIR/$SCRIPT_NAME" "$SEARCH_DIR")
|
|
if [ "${#files[@]}" -eq 0 ]; then
|
|
exit 0
|
|
fi
|
|
|
|
"$SCRIPT_DIR/hipify-perl" -inplace -print-stats "$@" "${files[@]}"
|