mpslab-asu / dmazerunner Goto Github PK
View Code? Open in Web Editor NEWdMazeRunner: Dataflow acceleration optimization infrastructure for coarse-grained programmable accelerators
License: MIT License
dMazeRunner: Dataflow acceleration optimization infrastructure for coarse-grained programmable accelerators
License: MIT License
Hi,
I'm reviewing the code to adapt it to an algorithm of my own.
I believe there is a mistake in https://github.com/MPSLab-ASU/dMazeRunner/blob/master/python/dMazeRunner/common/optimizer.py on line 66.
Shouldn't ox and oy be inverted? I guess this mistake could have gone unnoticed due to testing with equal output width and height tiling factors.
Correct me if I'm mistaken.
Best, Luca
Hi, after I installed and followed all the instructions. I now want to run the scripts.
after running this line
python run_optimizer.py --frontend mxnet --model resnet18_v1 --auto-optimize
I get this error:
Traceback (most recent call last):
File "run_optimizer.py", line 1, in
from matplotlib import pyplot as plt
File "/home/hussain/.local/lib/python3.7/site-packages/matplotlib/init.py", line 138, in
from . import cbook, rcsetup
File "/home/hussain/.local/lib/python3.7/site-packages/matplotlib/cbook/init.py", line 31, in
import numpy as np
File "/home/hussain/.local/lib/python3.7/site-packages/numpy/init.py", line 142, in
from . import core
File "/home/hussain/.local/lib/python3.7/site-packages/numpy/core/init.py", line 99, in
from . import _dtype_ctypes
File "/home/hussain/.local/lib/python3.7/site-packages/numpy/core/_dtype_ctypes.py", line 26, in
import ctypes
File "/usr/lib64/python3.7/ctypes/init.py", line 7, in
from _ctypes import Union, Structure, Array
ImportError: cannot import name 'Union' from '_ctypes' (/home/hussain/dMazeRunner/tvm/nnvm/python/nnvm/_ctypes/init.py)
Can someone please help me to solve this issue because I can't get it solved no matter what I did to the code.
Greetings,
Inside "dMazeRunner/examples/" you mention that you can specify the architecture by using this code
python conv.py [--arch-spec arch_spec.json]
or also this code
python gemm.py [--arch-spec arch_spec.json]
I tried to change so many parameters inside this file "arch_spec.json", and execute the commands above, but the results of EDP,Cycles, Energy are the same.
However, Inside the "dMazeRunner/scripts/run_optimizer.py" if I change any parameters inside "dMazeRunner/scripts/arch_spec.json" I will see an immediate effect on the results. while it's not the case with "dMazeRunner/examples/conv.py" or "dMazeRunner/examples/gemm.py"
Is there a bug in the code? or did I do something wrong. Can someone please fix it, or tell me how to fix it. I tried many methods including this code. where I added also "arch_basic". but I don't see any change
args = parser.parse_args() if args.arch_spec: with open(args.arch_spec) as jsonFile: # Parameters used by analytical model of dataflow execution json_data = json.load(jsonFile) env_params = json_data["arch_details"] env = expr_parameters.Environment(**env_params) # Params used by map-space generator and optimizer expr_params = json_data["arch_basic"] params = expr_parameters.ExprParameters(**expr_params) else: env = expr_parameters.Environment() params = expr_parameters.ExprParameters(env)
Thank you very much for your time.
Greetings,
I have been trying to implement my own model, but for some reason the function
"sym, params = nnvm.frontend.from_keras(model1)"
The whole code runs only this line doesn't run. and I don't get what's the error, the error window doesn't mention what is wrong just an empty window with
"Failed to download model cifar10
Error: "
and I was wondering what kind of model can be accepted. or this framework doesn't support any other model except the rebuilt in the framework.
The defined model was as followe:
if args.model == "cifar10":
model1 = keras.Sequential()
model1.add(keras.layers.Conv2D(32, (3,3), activation='relu', input_shape=(32, 32,3)))
model1.add(keras.layers.MaxPooling2D((2,2)))
model1.add(keras.layers.Conv2D(64, (3,3), activation='relu'))
model1.add(keras.layers.MaxPooling2D((2,2)))
model1.add(keras.layers.Conv2D(64, (3,3), activation='relu'))
model1.add(keras.layers.Flatten())
model1.add(keras.layers.Dense(64, activation='relu'))
model1.add(keras.layers.Dense(10))
model1.summary()
model1.load_weights('model1_weights.h5')
from PIL import Image
from keras.applications.resnet50 import preprocess_input
img_url = 'https://github.com/dmlc/mxnet.js/blob/master/data/cat.png?raw=true'
download(img_url, 'cat.png')
img = Image.open('cat.png').resize((32, 32))
# input preprocess
data = np.array(img)[np.newaxis, :].astype('float32')
data = preprocess_input(data).transpose([0, 3, 1, 2])
shape1 = (1, 3, 32, 32) #input shape; need to be obtained from the model
shape_dict = {'input_1': shape1}
sym, params = nnvm.frontend.from_keras(model1)
target = 'llvm'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.