This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sweep through a range of parameters for a dynamic convolution workload. | |
# To be executed from the main directory of lat-dynamic. | |
from multiprocessing import Pool | |
import os | |
# ResNet34 block parameters. | |
blocks = { | |
"block1": {"channels": "64", "in_size": "58"}, | |
"block2": {"channels": "128", "in_size": "30"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET := template | |
OBJS := template.o | |
LIBLOKI_DIR ?= /usr/groups/comparch-loki/tools/releases/libloki/current | |
LAT_IFC_DIR ?= /usr/groups/comparch-loki/tools/releases/lat-ifc/current | |
LAT_NN_DIR ?= /usr/groups/comparch-loki/tools/releases/lat-nn/current | |
$(TARGET): $(OBJS) | |
loki-clang -L$(LIBLOKI_DIR)/lib -L$(LAT_IFC_DIR)/lib -L$(LAT_NN_DIR)/lib -o $@ $+ -lloki -llat-nn -llat-ifc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import os | |
import subprocess | |
import sys | |
import torch | |
def main(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--batch", type=int, default=256) | |
parser.add_argument("--img-size", type=int, default=32) |