Skip to content

Commit

Permalink
提交tfacc compute server
Browse files Browse the repository at this point in the history
  • Loading branch information
黄宇扬 committed Apr 22, 2024
1 parent 2a16863 commit 6eb96e8
Show file tree
Hide file tree
Showing 9 changed files with 2,310 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ token
/example/Android/LLMAssistant/local.properties
/test/cmmlu/results/
/models/
/localtest/
/localtest/
/third_party/tfacc/driver/tfacc2/result
22 changes: 22 additions & 0 deletions third_party/tfacc/driver/tfacc2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
obj-m += tfacc2.o
PWD=$(shell pwd)

#LINUX_VERSION=$(LINUX_VERSION)
KERNEL_VERSION=$(shell uname -r)

ifeq ($(LINUX_VERSION),Ubuntu)
KDIR=/usr/src/linux-headers-$(KERNEL_VERSION)
else
KDIR=/usr/src/kernels/$(KERNEL_VERSION)/
endif


install:
bash ./build_driver.sh

tfacc2:
make -C $(KDIR) M=$(PWD) modules
make -C $(KDIR) M=$(PWD) modules_install
depmod -A
clean:
make -C $(KDIR) M=$(PWD) clean
21 changes: 21 additions & 0 deletions third_party/tfacc/driver/tfacc2/build_driver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

base_dir=$(
cd "$(dirname "$0")" || exit
pwd
)
cd "${base_dir}" || exit

cp ../../tfsmi /usr/local/bin/tfsmi
cp ../../tfsmbios /usr/local/bin/tfsmbios

output_path=result/$1

rm -rf "${output_path}"
mkdir -p "${output_path}"
cp -r $(ls | grep -v result | xargs) "${output_path}"

cd "${output_path}" || exit

export LINUX_VERSION=$(cat /etc/issue | awk -F ' ' '{print $1}' | awk 'NR==1')
make tfacc2
1 change: 1 addition & 0 deletions third_party/tfacc/driver/tfacc2/modules.order
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/home/huangyuyang/Downloads/new/tfdl2/driver/tfacc2/tfacc2.ko
Loading

0 comments on commit 6eb96e8

Please sign in to comment.