buddy-compiler / buddy-mlir

An MLIR-based compiler framework bridges DSLs (domain-specific languages) to DSAs (domain-specific architectures).
https://buddy-compiler.github.io/
Apache License 2.0
514 stars 167 forks source link

[DAP/Whisper] Extract RFFT operation from 'dap.whisper_preprocess'. #379

Closed taiqzheng closed 2 months ago

taiqzheng commented 2 months ago

Change the format of dap.whisper_preprocess and top level function @buddy_whisperPreprocess Previous version:

 dap.whisper_preprocess %input, %output : memref<?xf64>, memref<1x80x3000xf32>

Current version:

 %output = dap.whisper_preprocess %input : memref<?xf64> to memref<1x80x3000xf32>

For changing %output from operand to result, we can use replaceOp() to replace the combination of memref.copy and eraseOp().