def func(ctx, clean=False): wasm_cmake(EXPERIMENTS_FUNC_DIR, EXPERIMENTS_FUNC_BUILD_DIR, "image", clean=clean) wasm_file = join(EXPERIMENTS_FUNC_BUILD_DIR, "tf", "image.wasm") wasm_copy_upload("tf", "image", wasm_file)
def func(ctx, clean=False): wasm_cmake(EXPERIMENTS_FUNC_DIR, EXPERIMENTS_FUNC_BUILD_DIR, "mapper", clean=clean) wasm_file = join(EXPERIMENTS_FUNC_BUILD_DIR, "gene", "mapper.wasm") wasm_copy_upload("gene", "mapper", wasm_file)
def func(ctx, clean=False): wasm_cmake( EXPERIMENTS_FUNC_DIR, EXPERIMENTS_FUNC_BUILD_DIR, "polybench_all_funcs", clean=clean, ) build_dir = join(EXPERIMENTS_FUNC_BUILD_DIR, "polybench") all_files = listdir(build_dir) wasm_files = [f for f in all_files if f.endswith(".wasm")] for wasm_file in wasm_files: func_name = wasm_file.replace(".wasm", "") full_file = join(build_dir, wasm_file) print("Uploading polybench/{} ({})".format(func_name, full_file)) wasm_copy_upload("polybench", func_name, full_file)
def _copy_built_function(user, func): src_file = join(FUNC_BUILD_DIR, user, ".".join([func, "wasm"])) wasm_copy_upload(user, func, src_file)