diff --git a/vta/python/vta/exec/rpc_server.py b/vta/python/vta/exec/rpc_server.py index 768f6a00d451..c318e2dd5178 100644 --- a/vta/python/vta/exec/rpc_server.py +++ b/vta/python/vta/exec/rpc_server.py @@ -87,8 +87,8 @@ def reconfig_runtime(cfg_json): ldflags = pkg.ldflags lib_name = dll_path source = pkg.lib_source - logging.info("Rebuild runtime: output=%s, cflags=%s, source=%s, ldflags=%s", - dll_path, str(cflags), str(source), str(ldflags)) + logging.info("Rebuild runtime:\n output=%s,\n cflags=%s,\n source=%s,\n ldflags=%s", + dll_path, '\n\t'.join(cflags), '\n\t'.join(source), '\n\t'.join(ldflags)) cc.create_shared(lib_name, source, cflags + ldflags) with open(cfg_path, "w") as outputfile: outputfile.write(pkg.cfg_json) @@ -99,10 +99,10 @@ def main(): parser = argparse.ArgumentParser() parser.add_argument('--host', type=str, default="0.0.0.0", help='the hostname of the server') - parser.add_argument('--port', type=int, default=9090, - help='The port of the PRC') + parser.add_argument('--port', type=int, default=9091, + help='The port of the RPC') parser.add_argument('--port-end', type=int, default=9199, - help='The end search port of the PRC') + help='The end search port of the RPC') parser.add_argument('--key', type=str, default="", help="RPC key used to identify the connection type.") parser.add_argument('--tracker', type=str, default="", diff --git a/vta/python/vta/libinfo.py b/vta/python/vta/libinfo.py index 6cda7dfdeb7d..f7de9c55b1a0 100644 --- a/vta/python/vta/libinfo.py +++ b/vta/python/vta/libinfo.py @@ -21,5 +21,6 @@ def find_libvta(optional=False): lib_path = [os.path.join(x, lib_name) for x in lib_search] lib_found = [x for x in lib_path if os.path.exists(x)] if not lib_found and not optional: - raise RuntimeError("Cannot find libvta: candidates are: " % str(lib_path)) + raise RuntimeError('Cannot find the files.\n' + + 'List of candidates:\n' + str('\n'.join(lib_path))) return lib_found diff --git a/vta/tests/hardware/common/test_lib.cc b/vta/tests/hardware/common/test_lib.cc index 95b793ea3ba1..98b5f9a030b9 100644 --- a/vta/tests/hardware/common/test_lib.cc +++ b/vta/tests/hardware/common/test_lib.cc @@ -46,12 +46,12 @@ uint64_t vta( void* vta_store_handle = VTAMapRegister(VTA_STORE_ADDR, VTA_RANGE); // Physical address pointers - uint32_t insn_phy = insns ? cma_get_phy_addr(insns) : 0; - uint32_t uop_phy = uops ? cma_get_phy_addr(uops) : 0; - uint32_t input_phy = inputs ? cma_get_phy_addr(inputs) : 0; - uint32_t weight_phy = weights ? cma_get_phy_addr(weights) : 0; - uint32_t bias_phy = biases ? cma_get_phy_addr(biases) : 0; - uint32_t output_phy = outputs ? cma_get_phy_addr(outputs) : 0; + uint32_t insn_phy = insns ? VTAMemGetPhyAddr(insns) : 0; + uint32_t uop_phy = uops ? VTAMemGetPhyAddr(uops) : 0; + uint32_t input_phy = inputs ? VTAMemGetPhyAddr(inputs) : 0; + uint32_t weight_phy = weights ? VTAMemGetPhyAddr(weights) : 0; + uint32_t bias_phy = biases ? VTAMemGetPhyAddr(biases) : 0; + uint32_t output_phy = outputs ? VTAMemGetPhyAddr(outputs) : 0; #if VTA_DEBUG == 1 printf("INFO - Starting FPGA!\n"); @@ -1453,4 +1453,4 @@ int gemm_test(int batch, int in_channels, int out_channels, bool uop_compression printf("INFO - Blocked GEMM test failed, got %d errors!\n", err); return -1; } -} \ No newline at end of file +} diff --git a/vta/tests/hardware/pynq/Makefile b/vta/tests/hardware/metal_test/Makefile similarity index 94% rename from vta/tests/hardware/pynq/Makefile rename to vta/tests/hardware/metal_test/Makefile index 7a862e22eff9..4174b4e4726d 100644 --- a/vta/tests/hardware/pynq/Makefile +++ b/vta/tests/hardware/metal_test/Makefile @@ -11,7 +11,7 @@ OBJECTS = pynq_driver.o test_lib.o metal_test.o EXECUTABLE = vta # Include VTA config -VTA_CONFIG = python ../../../make/vta_config.py +VTA_CONFIG = python ../../../config/vta_config.py CFLAGS += `${VTA_CONFIG} --cflags` LDFLAGS += `${VTA_CONFIG} --ldflags` VTA_TARGET := $(shell ${VTA_CONFIG} --target) diff --git a/vta/tests/hardware/pynq/metal_test.cc b/vta/tests/hardware/metal_test/metal_test.cc similarity index 94% rename from vta/tests/hardware/pynq/metal_test.cc rename to vta/tests/hardware/metal_test/metal_test.cc index 56be244baa79..48d719ff4b32 100644 --- a/vta/tests/hardware/pynq/metal_test.cc +++ b/vta/tests/hardware/metal_test/metal_test.cc @@ -10,7 +10,9 @@ #include #include #include -#include "../../../src/pynq/pynq_driver.h" +#ifdef VTA_TARGET_PYNQ +# include "../../../src/pynq/pynq_driver.h" +#endif // VTA_TARGET_PYNQ #include "../common/test_lib.h" int main(void) {