Skip to content

Instantly share code, notes, and snippets.

import subprocess
import json
import re
import argparse
from datetime import datetime, timedelta
from pathlib import Path
def sh(cmd):
print(cmd)

Introduction

The TVM community has worked since the v0.8 release to deliver many exciting features and improvements. This is the first release with the new quarterly release schedule and includes highlights such as:

  • TBD

RFCs

These RFCs have been merged in apache/tvm-rfcs since the last release.

#!/usr/bin/env python3
import argparse
import subprocess
import textwrap
import json
import junitparser
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parent.parent.parent
#!/bin/bash
set -euxo pipefail
curl -L "$1" > main_report.xml
curl -L "$2" > shard_report.xml
python list_tests.py --no-details --file main_report.xml | sort > main.log
python list_tests.py --no-details --file shard_report.xml | sort > shard.log
git add main.log -f
@driazati
driazati / skipped_10.0.csv
Created January 13, 2022 23:42
search for skipped_XX.0.csv for [10, 100]
runtime (s) file test
1044.31 tests/python/frontend/tensorflow/test_forward.py test_forward_broadcast_args
697.41 tests/python/frontend/tensorflow/test_forward.py test_forward_broadcast_to
624.77 tests/python/frontend/tensorflow/test_forward.py test_forward_ssd
567.74 tests/python/frontend/tflite/test_forward.py test_all_elemwise
433.44 tests/python/topi/python/test_topi_upsampling.py test_upsampling3d
329.4 tests/python/topi/python/test_topi_conv2d_int8.py test_conv2d_nchw
326.02 tests/python/frontend/pytorch/test_object_detection.py test_detection_models
282.74 tests/python/frontend/tflite/test_forward.py test_forward_transpose_conv
280.26 tests/python/topi/python/test_topi_conv2d_hwnc_tensorcore.py test_conv2d_hwnc_tensorcore
# download CI logs to a folder with this file and run
# for i in (seq 10 10 100) (base) [ 12:30:34 ]
# python slow_test_times.py $i
# end
import subprocess
import sys
from pathlib import Path
p = Path(".").glob("*.ai")
@driazati
driazati / check_module.py
Created January 5, 2022 23:35
check that all the folders in a Python module are reachable via a direct import statement
import textwrap
import importlib
from types import ModuleType
import tvm
from pathlib import Path
def has_init(p: Path) -> bool:
return len(list(p.glob("__init__.py"))) == 1
import re
import sys
import random
content = open(sys.argv[1]).read()
def gen_meow(word):
chars_to_add = len(word) - len("meow")
if chars_to_add <= 0:
return "meow"
// run in the console
const x = document.querySelector("iframe");
document.body.innerHTML = "";
document.body.appendChild(x);
x.style.height = "100vh";
// then select the iframe #document in the element window and run
$0.querySelector("#graphiql").style.height = "85vh";
@driazati
driazati / nested_list_to_md_bullets.py
Created April 2, 2021 21:26
convert a list of flat nested items to markdown bullet points
# The ideal usage is to create an index of all the files
# from the current dir for describing in some .md file:
# find . | grep -v .git | python nested_list_to_md_bullets.py
import sys
import argparse
import pprint
parser = argparse.ArgumentParser(description='')
parser.add_argument('--file', default='-')