Skip to content

Commit 7c4dd0b

Browse files
kazumtmoreau89
authored andcommitted
[TOPI] add nn schedulers for HLS backends (#1663)
* [TOPI] add nn schedulers for HLS backends * fix pylint * fix topi transform test
1 parent 12839e6 commit 7c4dd0b

File tree

10 files changed

+437
-17
lines changed

10 files changed

+437
-17
lines changed

nnvm/python/nnvm/testing/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ def ctx_list():
1010
device_list = (device_list.split(",") if device_list
1111
else ["llvm", "cuda"])
1212
device_list = set(device_list)
13-
res = [("llvm", tvm.cpu(0)), ("cuda", tvm.gpu(0))]
14-
return [x for x in res if x[1].exist and x[0] in device_list]
13+
res = [(device, tvm.context(device, 0)) for device in device_list]
14+
return [x for x in res if x[1].exist]

src/codegen/codegen_aocl.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ runtime::Module BuildAOCL(Array<LoweredFunc> funcs, std::string target_str,
3333

3434
// Compile the .cl file.
3535
std::string cmd = "aoc aocl.cl";
36+
// AOCL supports fp64.
37+
cmd += " -Dcl_khr_fp64";
3638
Target target = Target::create(target_str);
3739
if (target->device_name != "") {
3840
cmd += " -board=" + target->device_name;

topi/python/topi/hls/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
from __future__ import absolute_import as _abs
44

55
from .injective import schedule_injective, schedule_elemwise, schedule_broadcast
6+
from .nn import *

0 commit comments

Comments
 (0)