Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[buddy] The last step to achieve deep learning model e2e inference in vector repo #262

Open
xlinsist opened this issue Jul 16, 2023 · 1 comment

Comments

@xlinsist
Copy link
Contributor

Recently buddy-benchmark has implemented the e2e compilation of "EfficientNet-Quant" (see https://github.com/buddy-compiler/buddy-benchmark/tree/main/benchmarks/DeepLearning/Models/EfficientNet-Quant), a typical deep learning quantized model without float point operations involved in the lowering process. Executing it on the current version of vector repo seems like a good fit, except that there are a lot of memref.alloc() instructions in this model(e.g. "%alloc = memref.alloc() {alignment = 64 : i64} : memref<1x224x224x3xi8>"), which haven't been supported.

In the previous handwritten buddy cases, we used memref.get_global instead of memref.alloc() to initialize array intermediate variables, but to replace all "alloc" statements in this model is inefficient and cumbersome. Would it be possible for vector repo to support "alloc" statements in the near future, or are there any workarounds?

@xlinsist
Copy link
Contributor Author

Further observation shows that additional support for these three functions(malloc, memcpy and memrefCopy) may be required to execute this model. Here, memrefCopy is originally implemented in the MLIR shared object file libmlir_runner_utils.so. @ksco @sequencer

$ readelf -s efficientnet.mlir.o | grep UND

     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
  6140: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND malloc
  6141: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND memcpy
  6142: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND memrefCopy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant