
This is a companion to #118583, although it can be landed independently because since #117922 dialects do not have to use the same Python binding framework as the Python core code. This PR ports all of the in-tree dialect and pass extensions to nanobind, with the exception of those that remain for testing pybind11 support. This PR also: * removes CollectDiagnosticsToStringScope from NanobindAdaptors.h. This was overlooked in a previous PR and it is duplicated in Diagnostics.h. --------- Co-authored-by: Jacques Pienaar <jpienaar@google.com>
23 lines
772 B
C++
23 lines
772 B
C++
//===- GPUPasses.cpp - Pybind module for the GPU passes ------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
#include "mlir-c/Dialect/GPU.h"
|
|
|
|
#include "mlir/Bindings/Python/Nanobind.h"
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Module initialization.
|
|
// -----------------------------------------------------------------------------
|
|
|
|
NB_MODULE(_mlirGPUPasses, m) {
|
|
m.doc() = "MLIR GPU Dialect Passes";
|
|
|
|
// Register all GPU passes on load.
|
|
mlirRegisterGPUPasses();
|
|
}
|