mirror of https://github.com/llvm/torch-mlir
[bazel] fix bazel with stablehlo refbackend and fix some typo (#2911)
parent
f3e8199a6d
commit
5733c84443
|
@ -25,7 +25,7 @@ STABLEHLO_TO_LINALG_FUNC_PIPELINE = ",".join([
|
|||
|
||||
|
||||
class LinalgOnTensorsStablehloBackend(StablehloBackend):
|
||||
"""Main entry-point for the linalg-on-tensors based TOSA backend.
|
||||
"""Main entry-point for the linalg-on-tensors based Stablehlo backend.
|
||||
|
||||
This currently uses the linalg-on-tensors RefBackend for actual execution.
|
||||
"""
|
||||
|
@ -35,11 +35,10 @@ class LinalgOnTensorsStablehloBackend(StablehloBackend):
|
|||
self.refbackend = RefBackendLinalgOnTensorsBackend()
|
||||
|
||||
def compile(self, imported_module: Module):
|
||||
"""Compiles an imported module that satisfied the TOSA backend contract.
|
||||
"""Compiles an imported module that satisfied the Stablehlo backend contract.
|
||||
|
||||
Args:
|
||||
imported_module: The MLIR module consisting of funcs in the TOSA
|
||||
dialect.
|
||||
imported_module: The MLIR module consisting of funcs in the Stablehlo dialect.
|
||||
Returns:
|
||||
An opaque, backend specific compiled artifact object that can be
|
||||
passed to `load`.
|
||||
|
|
|
@ -867,7 +867,10 @@ cc_library(
|
|||
hdrs = [
|
||||
"include/torch-mlir/InitAll.h",
|
||||
],
|
||||
copts = ["-DTORCH_MLIR_ENABLE_REFBACKEND"],
|
||||
copts = [
|
||||
"-DTORCH_MLIR_ENABLE_REFBACKEND",
|
||||
"-DTORCH_MLIR_ENABLE_STABLEHLO",
|
||||
],
|
||||
strip_include_prefix = "include",
|
||||
deps = [
|
||||
":TorchMLIRConversionPasses",
|
||||
|
@ -882,6 +885,8 @@ cc_library(
|
|||
"@llvm-project//mlir:Dialect",
|
||||
"@llvm-project//mlir:DialectUtils",
|
||||
"@llvm-project//mlir:IR",
|
||||
"@stablehlo//:stablehlo_passes",
|
||||
"@stablehlo//:linalg_passes",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue