### Install CUDA # # sudo sh cuda_*_linux.run export CUDA_HOME=/usr/local/cuda export PATH=$PATH:$CUDA_HOME/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_HOME/lib64 ###init GPU_COUNT=$(nvidia-smi --list-gpus | wc -l) #echo $GPU_COUNT dir=$(pwd) ### Install cuda-samples-12.8 # # unzip cuda-samples-12.8.zip # cd cuda-samples-12.8 # mkdir build && cd build # cmake .. # make -j$(nproc) # ### Install OpenCL-Benchmark # unzip OpenCL-Benchmark-master.zip # ### 设置软链接 cd $dir #ln -s cuda-samples-12.8/build/Samples/ $dir/Samples ln -s OpenCL-Benchmark-master OpenCL-Benchmark ln -s nccl-tests-2.16.4/build nccl date | tee $dir/gpu.log hostnamectl | tee -a $dir/gpu.log #fastfetch | tee -a $dir/gpu.log ### 硬件信息查询 #lspci echo -e "###lspci -d 10de:" | tee -a $dir/gpu.log lspci -d 10de: | tee -a $dir/gpu.log sleep 5 # #nvidia-smi echo -e "\n###nvidia-smi\n" | tee -a $dir/gpu.log nvidia-smi | tee -a $dir/gpu.log sleep 5 # #topo echo -e "\n###nvidia-smi topo -m\n" | tee -a $dir/gpu.log nvidia-smi topo -m | tee -a $dir/gpu.log sleep 5 # #query echo -e "\n###nvidia-smi -q -u\n" | tee -a $dir/gpu.log nvidia-smi -q -u | tee -a $dir/gpu.log sleep 5 # #query echo -e "\n###nvidia-smi -q -i 0\n" | tee -a $dir/gpu.log nvidia-smi -q -i 0 | tee -a $dir/gpu.log sleep 5 # #Configured echo -e "\n###nvidia-smi --format=csv --query-gpu=gpu_name,serial,gpu_bus_id,vbios_version,memory.total,pcie.link.gen.max,pcie.link.gen.current,pcie.link.width.max,pcie.link.width.current\n" | tee -a $dir/gpu.log nvidia-smi --format=csv --query-gpu=gpu_name,serial,gpu_bus_id,vbios_version,memory.total,pcie.link.gen.max,pcie.link.gen.current,pcie.link.width.max,pcie.link.width.current | tee -a $dir/gpu.log sleep 5 # ### GPU测试 #nccl cd $dir/nccl NCCL_NTHREADS=$(nproc) NCCL_MIN_NCHANNELS=$GPU_COUNT ./all_reduce_perf -b 1m -e 1g -f 2 -g $GPU_COUNT | tee -a $dir/gpu.log sleep 10 # #p2pBandwidthLatencyTest echo -e "\n###p2pBandwidthLatencyTest\n" | tee -a $dir/gpu.log cd $dir/Samples/5_Domain_Specific/p2pBandwidthLatencyTest ./p2pBandwidthLatencyTest | tee -a $dir/gpu.log sleep 10 # #bandwidthTest echo -e "###bandwidthtest" | tee -a $dir/gpu.log for (( i=0; i> $dir/gpu.log } done ./bandwidthTest --device=all >> $dir/gpu.log cat $dir/gpu.log | grep 3200000 sleep 10 # #matrixMul echo -e "\n###matrixMul\n" | tee -a $dir/gpu.log cd $dir/Samples/0_Introduction/matrixMul sh matrixMul-4-small.sh | tee -a $dir/gpu.log sleep 10 # #alignedTypes echo -e "\n###alignedTypes\n" | tee -a $dir/gpu.log cd $dir/Samples/6_Performance ./alignedTypes/alignedTypes | tee -a $dir/gpu.log sleep 5 # #LargeKernelParameter echo -e "\n###LargeKernelParameter\n" | tee -a $dir/gpu.log cd $dir/Samples/6_Performance ./LargeKernelParameter/LargeKernelParameter | tee -a $dir/gpu.log sleep 5 # #transpose echo -e "\n###transpose\n" | tee -a $dir/gpu.log cd $dir/Samples/6_Performance ./transpose/transpose | tee -a $dir/gpu.log sleep 5 # #UnifiedMemoryPerf echo -e "\n###UnifiedMemoryPerf\n" | tee -a $dir/gpu.log cd $dir/Samples/6_Performance ./UnifiedMemoryPerf/UnifiedMemoryPerf | tee -a $dir/gpu.log sleep 5 # #cudaGraphsPerfScaling echo -e "\n###cudaGraphsPerfScaling\n" | tee -a $dir/gpu.log cd $dir/Samples/6_Performance ./cudaGraphsPerfScaling/cudaGraphsPerfScaling | tee -a $dir/gpu.log sleep 5 # #OpenCL-Benchmark echo -e "\n###OpenCL-Benchmark\n" | tee -a $dir/gpu.log cd $dir/OpenCL-Benchmark ./make.sh | tee -a $dir/gpu.log sleep 5 #lspci tv lspci -tv >> $dir/gpu.log #lspci vvv lspci -d 10de: -vvv >> $dir/gpu.log