<commit_before>#!/bin/bash

if [ $1 = " " ]
then
exit
fi

ROCM_PATH=$1
GEN_ISA=$2
FILE_NAMES=$3
OUT=$4
OUTPUT_FILE=$5
TARGET=""
if [ ${GEN_ISA:0:12} = "--target-isa" ]
then
  TARGET=${GEN_ISA:13:12}
fi

SOURCE="${BASH_SOURCE[0]}"
HIP_PATH="$( command cd -P "$( dirname "$SOURCE" )/.." && pwd )"

export KMDUMPISA=1
export KMDUMPLLVM=1
mkdir /tmp/hipgenisa
cp $FILE_NAMES $FILE_NAMES.kernel.tmp.cpp
echo "
int main(){}
" >> $FILE_NAMES.kernel.tmp.cpp
$HIP_PATH/bin/hipcc $FILE_NAMES.kernel.tmp.cpp -o /tmp/hipgenisa/a.out
mv dump.* /tmp/hipgenisa/<commit_msg>hipgenisa.sh: handle extern C on HCC path<commit_after>#!/bin/bash

if [ $1 = " " ]
then
exit
fi

ROCM_PATH=$1
GEN_ISA=$2
FILE_NAMES=$3
OUT=$4
OUTPUT_FILE=$5
TARGET=""
if [ ${GEN_ISA:0:12} = "--target-isa" ]
then
  TARGET=${GEN_ISA:13:12}
fi

SOURCE="${BASH_SOURCE[0]}"
HIP_PATH="$( command cd -P "$( dirname "$SOURCE" )/.." && pwd )"

export KMDUMPISA=1
export KMDUMPLLVM=1
mkdir /tmp/hipgenisa
#cp $FILE_NAMES $FILE_NAMES.kernel.tmp.cpp
sed 's/extern \+"C" \+//g' $FILE_NAMES > $FILE_NAMES.kernel.tmp.cpp
echo "
int main(){}
" >> $FILE_NAMES.kernel.tmp.cpp
$HIP_PATH/bin/hipcc $FILE_NAMES.kernel.tmp.cpp -o /tmp/hipgenisa/a.out
mv dump.* /tmp/hipgenisa/
{'fraction_non_alphanumeric': 0.19950535861500412, 'fraction_numerical': 0.026380873866446827, 'mean_word_length': 4.594470046082949, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2682736', 'n_tokens_mistral': 569, 'n_tokens_neox': 533, 'n_words': 103}