Skip to content

Commit

Permalink
Add project code
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterJH5574 committed Dec 4, 2024
1 parent 9819fc3 commit b2b5b42
Show file tree
Hide file tree
Showing 30 changed files with 19,846 additions and 16 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
# 15-745 Project - MagPy with TVM

This branch is the integration of MagPy with TVM, for eager-mode DNN
program compilation in TVM.

## Project Reports

* [Project proposal](reports/15745_Project_Proposal.pdf)
* [Project milestone report](reports/15745_Project_Milestone_Report.pdf)
* Project final report (TBA)

## Reproduce the results

Please follow the steps below to reproduce the evaluation results.

**Step 1.** Install TVM via

```bash
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cu123
```

**Step 2.** Install MagPy by following [the MagPy installation](#installation).

**Step 3.** Run evaluation via

```bash
./eval_script/run_15.sh
```



---

# MagPy
MagPy is a JIT compiler for PyTorch programs. It can extract the operator graph from PyTorch programs and optimize the graph with a wide range of deep learning graph compilers.

Expand Down
26 changes: 26 additions & 0 deletions eval_script/run_15.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -euxo pipefail

TIME_TAG=`date +%y%m%d-%H%M%S`

export GPU_NUM_DEVICES=1
export PJRT_DEVICE=GPU

LOG_DIR=logs/e2e
mkdir -p $LOG_DIR

for bs in 1 16
do
for model in align bert deberta densenet monodepth quantized resnet tridentnet
for model in resnet
do
for compile in eager dynamo sys script sys-torchscript sys-tvm
do
rm -rf $LOG_DIR/$model.$bs.$compile.log
LD_PRELOAD=build/ldlong.v3.9.12.so python3 run.py --bs $bs --model $model --compile $compile 2>&1 | tee $LOG_DIR/$model.$bs.$compile.log
done
done
done

wait
Loading

0 comments on commit b2b5b42

Please sign in to comment.