It has been challenging to extend compiler support for various custom accelerators due to the lack of a common interface for invoking the devices from various DSLs as well as the granularity mismatch between coarse-grained accelerator operations and finer-grained compiler intrinsics. We propose mitigating this impedance mismatch by using the Instruction-Level Abstraction (ILA) as the software/hardware interface for accelerators. The ILA provides a formal specification of the accelerator, which can be verified against the RTL implementation, and presents a uniform processor/accelerator target interface for compilers. We implement a prototype of this approach using the BYOC framework and additionally extend its pattern-matching capabilities with flexible matching by applying a term-rewriting system to potentially discover more matches between the input program and target accelerator patterns. The flexible matching step further automates the process of adding accelerator support into TVM.