| #ifndef PLATFORMS_XLA_MOSAIC_CUSTOM_CALL_KERNEL_NAME_H_ |
| #define PLATFORMS_XLA_MOSAIC_CUSTOM_CALL_KERNEL_NAME_H_ |
| |
| #include <string> |
| |
| #include "third_party/absl/status/statusor.h" |
| #include "third_party/llvm/llvm-project/mlir/include/mlir/IR/Operation.h" |
| |
| namespace xla::mosaic { |
| |
| // Returns the 'kernel_name' contained in the given op. |
| // Returns an error if the string cannot be found. |
| absl::StatusOr<std::string> CustomCallKernelName(mlir::Operation* op); |
| |
| } // namespace xla::mosaic |
| |
| #endif // PLATFORMS_XLA_MOSAIC_CUSTOM_CALL_KERNEL_NAME_H_ |