I'm trying to compile a tflite model with a 510 target, I end up with an error:
RuntimeError: Cannot load module: libnncase.targets.k510.so, libnncase.targets.k510.so: cannot open shared object file: No such file or directory
import nncase
import os
dir_path = '/mnt/tflite/'
models = []
for file in os.listdir(dir_path):
if file.endswith('.tflite'):
models.append(dir_path + file)
def read_model_file(model_file):
with open(model_file, 'rb') as f:
model_content = f.read()
return model_content
def main():
for model in models:
print(model.split('/'))
name = str(model.split('/')[3])[7:].split('.')[0]
target = 'k510'
# compile_options
compile_options = nncase.CompileOptions()
compile_options.target = target
compile_options.dump_ir = True
compile_options.dump_asm = True
compile_options.dump_dir = 'tmp'
# compiler
compiler = nncase.Compiler(compile_options)
# import_options
import_options = nncase.ImportOptions()
# import
model_content = read_model_file(model)
compiler.import_tflite(model_content, import_options)
# compile
compiler.compile()
# kmodel
kmodel = compiler.gencode_tobytes()
with open(f'k510_{name}.kmodel', 'wb') as f:
f.write(kmodel)
if __name__ == '__main__':
main()
RuntimeError: Cannot load module: libnncase.targets.510.so, libnncase.targets.510.so: cannot open shared object file: No such file or directory
I'm trying to compile a tflite model with a 510 target, I end up with an error: RuntimeError: Cannot load module: libnncase.targets.k510.so, libnncase.targets.k510.so: cannot open shared object file: No such file or directory
Environment :