Skip to main content

A language and compiler for custom Deep Learning operations

Reason this release was yanked:

bug

Project description

ppl

Primitive Programming Language

Build instructions

Requirements

  • Working C and C++ toolchains(compiler[clang], linker)
  • cmake
  • ninja

1. install git lfs

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash

sudo apt-get install git-lfs

setting up lfs for the first time

git lfs install

2. clone PPL

2.1 If you had not pull code using the ssh method:

git config --global http.sslVerify false git clone git config --global http.sslVerify true

2.2 If you had pull code using the ssh method:

Change ssh to http

git remote set-url origin https://<your_name>@

2.3 set up for http

2.3.1 set http repo

cd ppl

2.3.2 Disable Locked Authentication

git config lfs.https://gerrit-ai.so#ph#go.vip/ppl.git/info/lfs.locksverify false

2.3.3 Local disk to save credentials (have security risk, but no need to enter a password every time you interact with the remote library)
note : If you have changed your password, just execute the following statement

git config --global credential.helper store

2.3.4 Skip ssl certificate verification

git config http.sslVerify false

2.3.5 When you change the password, you need to execute the statement below to update the locally saved password

git config --global credential.helper store

3. Get the LFS objects contained in the current commit

git lfs fetch git lfs checkout or: git lfs pull

4. If need update runtime

source envsetup.sh git config --global http.sslVerify false (suggested update outside docker) git submodule update --init git config --global http.sslVerify true ./update.sh

5. How to use git lfs

refer to: https://wiki.so#ph#go.com/pages/viewpage.action?pageId=127019078

6. Install LLVM, MLIR, Clang, and PPL

Using LLVM release files

download llvm+mlir-17.0.0-x86_64-linux-gnu-ubuntu-18.04-release.tar.gz to third_party

cd ppl/third_party
scp guest@172.22.12.22:/data/ppl_third_party/llvm+mlir-17.0.0-x86_64-linux-gnu-ubuntu-18.04-release.tar.gz .
(password:123456)
tar -xvhf llvm+mlir-17.0.0-x86_64-linux-gnu-ubuntu-18.04-release.tar.gz
ln -sf llvm+mlir-17.0.0-x86_64-linux-gnu-ubuntu-18.04-release llvm_release

7. build ppl

cd ppl
./build.sh
# ./build.sh DEBUG (debug mode)

Push Code

cd existing_repo
git pull -r
git push origin HEAD:refs/for/main

Run

ppl-compile options: --function : function need to be converted --I : include search path --print-debug-info : print loc information --print-ir : print ir --gen-ref : generate reference groups --chip : chip type --x : treat input as language --O0 : Optimisation level 0: none optimisation --O1 : Optimisation level 1: do ppl canonicalize --O2 : Optimisation level 2: do ppl pipeline and ppl canonicalize --O3 : Optimisation level 3: do all ppl optimisation --o : Output path for ir and c files --pm-enable-printing : Enable printing of IR before and after all passed

Test

You can use the script named ppl_compile.py to test the xx.pl file

For example: you can test xx.pl by executing the following command.

ppl_compile.py --src ./examples/matmul/mm2.pl --chip bm1684x --gen_test

Profiling

preprare PerfAI tool

download PerfAI tool from FTP:172.28.141.89 /perfAI_release/perfAI_release mv PerfAI_Release_xxx.tar.gz to ppl/third_party tar -xvhf PerfAI_Release_xxx.tar.gz ln -sf PerfAI_Release_xxx.tar.gz PerfAI cd PerfAI pip install -r requirements.txt

run

cd ppl/third_party/PerfAI/ source envsetup.sh ppl_compile.py --src examples/sdma/add_c_dual_loop.pl --chip bm1690 --profiling

profiling files will generate in test_add_c_dual_loop/profiling

CI

git clone ssh://liang.chen@gerrit-ai.so#ph#go.vip:29418/jenkins_pipeline.git

jenkins script regression/ppl_ci_test.groovy

dockerfile envsetup/docker/ppl_dailybuild.dockerfile

third-party version

triton 5df904233c11a65bd131ead7268f84cca7804275 llvm 2538e550420f

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tpu_ppl-1.6.19-cp312-cp312-manylinux1_x86_64.whl (76.4 MB view details)

Uploaded CPython 3.12

tpu_ppl-1.6.19-cp311-cp311-manylinux1_x86_64.whl (76.4 MB view details)

Uploaded CPython 3.11

tpu_ppl-1.6.19-cp310-cp310-manylinux1_x86_64.whl (76.4 MB view details)

Uploaded CPython 3.10

tpu_ppl-1.6.19-cp39-cp39-manylinux1_x86_64.whl (76.4 MB view details)

Uploaded CPython 3.9

tpu_ppl-1.6.19-cp38-cp38-manylinux1_x86_64.whl (76.4 MB view details)

Uploaded CPython 3.8

File details

Details for the file tpu_ppl-1.6.19-cp312-cp312-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for tpu_ppl-1.6.19-cp312-cp312-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b676a88dee5fe86d1699b3e0a9b943678a4073aeeb01866bc0e1047aa169a0d5
MD5 b8dd4a8c8c9017ed72c04096507b6ffe
BLAKE2b-256 e2c365262949456b1955e0817501be5df40a63d295d0f937543ed3b170e4790b

See more details on using hashes here.

File details

Details for the file tpu_ppl-1.6.19-cp311-cp311-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for tpu_ppl-1.6.19-cp311-cp311-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 303a2c8db2f18c0a3cb8364e6a0203a092ecf140f8dcc2c01bed1bf0eab4cd87
MD5 0a570b0131b63ded7b82459676c04b2b
BLAKE2b-256 ebf9699dfbf28113f71b95958b378ab4a8505b9d9199f6471ea4552cf80d2ec6

See more details on using hashes here.

File details

Details for the file tpu_ppl-1.6.19-cp310-cp310-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for tpu_ppl-1.6.19-cp310-cp310-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5e6ac95302771d665192ab6f329be3caa5097dbfe14b544db00efa1f795c3e25
MD5 8a4e22f146da2cea6563482be7d374bb
BLAKE2b-256 35cb753088343a0796bce8cc7b8d6b61fdb11ef8004177d32c57abd452e78db7

See more details on using hashes here.

File details

Details for the file tpu_ppl-1.6.19-cp39-cp39-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for tpu_ppl-1.6.19-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 41fcc52abfa9affb49149adc5e61ca64ffcee6bf060d09d764eb2e8a50b9ef0c
MD5 ee57f307a825d13e62bea64068d48d80
BLAKE2b-256 16a9f2a6c6487c618daa8dd77f9ee0df19106a649ffab258a49b7751f175944b

See more details on using hashes here.

File details

Details for the file tpu_ppl-1.6.19-cp38-cp38-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for tpu_ppl-1.6.19-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5239241f0f28cce06880f02a0eba258ceb13da8e36e0887ebddff6281ecc2b2d
MD5 c7e7ffe44cd59e2cbe7339c18b761f35
BLAKE2b-256 f9b2a17db8259cb13863e4385cea6e1de3b25334daea28cbdb9749d7742254f4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page