cornell-zhang / heterocl

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Heterogeneous Computing
https://cornell-zhang.github.io/heterocl/
Apache License 2.0
322 stars 92 forks source link

[Runtime] Improve HCL runtime system #341

Closed hecmay closed 3 years ago

hecmay commented 3 years ago

This PR mainly improves the following aspects:

Here is the proposed interface. To be strict, f.compile and f.generate_code functions are invoked before program execution. So they should not be part of the runtime system. But for simplicity, I just put them together here in the example.

# Generate source code in a local workdir
f.generate_code(args)

# Compile FPGA binary
key_path = "/home/sx233/aws-sx233-test.pem"
f.compile(args, remote=True, aws_key_path=key_path)

# Execute bitstream on AWS F1
f.execute(args, remote=True, aws_key_path=key_path)

This PR has a lower priority than PR #332.