Closed PBC48 closed 4 years ago
Please merge with the upstream to fix both the merging issue and the compilation error.
Fixed the issue. Also added a README to the hlib directory
Btw, where is heterocl.local? My code is throwing an error saying heterocl has no attribute local
We replaced hcl.local with hcl.scalar now. It's just a name change.
In addition, test_vgg.py and test_xception.py have been moved to model_vgg.py and model_xception.py respectively since these require the use of a local dataset and shouldn't be included in the testing framework
Should I remove model_*.py files from the tests folder and put them into another folder for demos?
Also, is hcl.log and hcl.sqrt working properly? They're failing tests
We should create a "samples" directory and put all the models there.
I'll double-check hcl.log
and hcl.sqrt
. Where are they used?
They are used in test_elemwise.py and test_math.py. hcl.power also seems to be acting up.
I will be traveling soon. So please allow me to fix some issues after two days. Basically, I'll remove the support for Python 2 and I'll also take a look at the hcl.log
, hcl.sqrt
, and hcl.pow
issue.
Added documentation for ImageNet stuff. Also made gen_imagenet.py more understandable. I'll update my report for internal usage by tomorrow.
Please merge with the latest upstream/master branch.
The pythonInterp from the test says it is version 1.4 but require a python of version 2.7 or newer
Can you try updating the v1.03 to v.104 in .circleci/config.yml?
I don't know how to include the relay stuff in setup.py. It's failing saying that tvm.relay can't be found
I think you'll also need to add TVM installation into the config.
how do I do that?
Let me try.
Please try #145.
I thought you don't need topi. In this case, just add this line to "install_tvm.sh" under ".circleci".
cd ../topi/python; python setup.py install --user; cd ../..
I also added nnvm too
Sorry, the path I gave you was wrong. It should be
cd topi/python; python setup.py install --user; cd ../..
Seems like you just need a very simple fix. I'll start reviewing the rest of the code.
It's just an incompatibility between old hlib and new hlib with the lenet and sobel samples
Yay!
Could you modify the file according to the review? I'll modify the rest. Thanks.
Sorry for the delay. I'll get these done by today
How do I know if my frontend tests were added to the testing framework?
We use pytest
for testing. You can check the file .circleci/config.yml
. You'll see that I use python -m pytest dir
to test the test cases under certain directory.
@PBC48 Please fix the tests if possible. Thanks!
It's strange. I think the issue is coming from heterocl.log and heterocl.pow. Were there any changes in these functions?
Also sqrt is weird.
hcl.power*
Can you show me how can I reproduce the bug with a simpler code?
Try this: """ import heterocl as hcl import hlib import numpy as np import numpy.testing as tst
hcl.init(hcl.Int())
def elemwise_pow(input1, input2, name='elemwise_pow'): return hcl.compute( input1.shape, lambda *x: hcl.power(input1[x], input2[x]), name=name)
A = hcl.placeholder((1,3)) B = hcl.placeholder((1,3)) O = hcl.placeholder((1,3)) s = hcl.create_schedule([A,B],elemwise_pow) f = hcl.build(s) A = hcl.asarray(np.random.randint(5, size=(1,3))) B = hcl.asarray(np.random.randint(5, size=(1,3))) O = hcl.asarray(np.zeros((1,3))) f(A,B,O) print(A,B,O) """ result: [[3 1 4]] [[3 4 3]] [[1104674816 1065353216 1115684864]]
I should expect: """[27,1,64]"""
Please check #147.
If that's the case, then it should work, but I can't seem to fetch and merge that into my repo
Try git fetch --all
then git pull upstream master
if you set the upstream
remote correctly.
It works now
Just kidding. the merge didn't work for some reason
Then I guess you need to fix some conflicts. Shouldn't be too hard. Let me know otherwise.
I says everything is up to date
After git pull
, you don't need to commit. You can directly push.
From the git log, it looks like the fix was included, but nothing has changed
@PBC48, can you check if you can fix test_keras.py
? I'm not sure how to fix that. Please pull
before you test. I have fixed some bugs.
Nevermind, I figured out the bug.
Yay
@PBC48 Just one question, why do we need to return moving_mean and moving_var for the batch_norm
function?
I have implemented a frontend for HeteroCL in the hlib directory. In the hlib directory there are two directories: frontend and op. Frontend contains the parser/transpiler and also a test directory that contains the tests that verify both the parser/transpiler and the backend functions in the op directory. Inside the op directory, there are three files: math.py, nn.py, and op.py. All of these files were formatted to meet the PEP8 standards.
I have not extended CircleCI to the tests, but I can do so in another pull