Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ static Value emitTranspose(ConversionPatternRewriter &rewriter, Location loc,

/// Converts stablehlo.partition_id to (flow.channel.rank % numPartitions)
struct PartitionIdOpConversion
: public OpConversionPattern<mlir::stablehlo::PartitionIdOp> {
: OpConversionPattern<mlir::stablehlo::PartitionIdOp> {
using OpConversionPattern<
mlir::stablehlo::PartitionIdOp>::OpConversionPattern;

Expand Down Expand Up @@ -437,7 +437,7 @@ struct PartitionIdOpConversion

/// Converts stablehlo.replica_id to floor_div(flow.channel.rank, numPartitions)
struct ReplicaIdOpConversion
: public OpConversionPattern<mlir::stablehlo::ReplicaIdOp> {
: OpConversionPattern<mlir::stablehlo::ReplicaIdOp> {
using Base::Base;

LogicalResult
Expand Down Expand Up @@ -833,7 +833,7 @@ struct ReduceScatterOpConversion final
};

struct CollectivePermuteOpConversion
: public OpConversionPattern<mlir::stablehlo::CollectivePermuteOp> {
: OpConversionPattern<mlir::stablehlo::CollectivePermuteOp> {
using OpConversionPattern<
mlir::stablehlo::CollectivePermuteOp>::OpConversionPattern;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ struct IfOpPattern final : OpConversionPattern<mlir::stablehlo::IfOp> {
};

// Rewrites `stablehlo.case` to a nested `scf.if`.
struct CaseOpPattern : public OpConversionPattern<mlir::stablehlo::CaseOp> {
struct CaseOpPattern : OpConversionPattern<mlir::stablehlo::CaseOp> {
using Base::Base;

// Recursively create if/else ops to handle each possible value in a case op.
Expand Down
2 changes: 1 addition & 1 deletion compiler/plugins/input/StableHLO/Conversion/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace mlir::iree_compiler::stablehlo {

struct StableHloOptions : public PassPipelineOptions<StableHloOptions> {};
struct StableHloOptions : PassPipelineOptions<StableHloOptions> {};

//===----------------------------------------------------------------------===//
// Pipelines
Expand Down
4 changes: 2 additions & 2 deletions compiler/plugins/input/StableHLO/PluginRegistration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ static bool checkOpForTuples(Operation *op) {
// The StableHLO plugin provides dialects, passes and opt-in options.
// Therefore, it is appropriate for default activation.
struct StableHLOSession
: public PluginSession<StableHLOSession, StableHLOOptions,
PluginActivationPolicy::DefaultActivated> {
: PluginSession<StableHLOSession, StableHLOOptions,
PluginActivationPolicy::DefaultActivated> {
static void registerPasses() {
// TODO(scotttodd): register other StableHLO passes?
registerStableHLOConversionPasses();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
void runOnOperation() override;
};

struct i48Toi64Converter : public TypeConverter {
struct i48Toi64Converter : TypeConverter {

Check warning on line 29 in compiler/plugins/input/TOSA/InputConversion/Converti48Toi64.cpp

View workflow job for this annotation

GitHub Actions / clang-tidy

compiler/plugins/input/TOSA/InputConversion/Converti48Toi64.cpp:29:8 [readability-identifier-naming]

invalid case style for class 'i48Toi64Converter'
public:
static Type convertType(Type type) {
if (type.isInteger(48)) {
Expand Down
5 changes: 2 additions & 3 deletions compiler/plugins/input/TOSA/PluginRegistration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ namespace {
//
// The TOSA plugin provides dialects, passes and opt-in options.
// Therefore, it is appropriate for default activation.
struct TOSASession
: public PluginSession<TOSASession, EmptyPluginOptions,
PluginActivationPolicy::DefaultActivated> {
struct TOSASession : PluginSession<TOSASession, EmptyPluginOptions,
PluginActivationPolicy::DefaultActivated> {
static void registerPasses() {
registerTOSAConversionPasses();
registerTosaToArithPass();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace mlir::iree_compiler::TorchInput {
namespace {

template <typename SrcOpTy, typename TargetOpTy>
struct TMTensorOpConversion : public OpRewritePattern<SrcOpTy> {
struct TMTensorOpConversion : OpRewritePattern<SrcOpTy> {
using OpRewritePattern<SrcOpTy>::OpRewritePattern;
LogicalResult matchAndRewrite(SrcOpTy srcOp,
PatternRewriter &rewriter) const override {
Expand All @@ -46,7 +46,7 @@ struct TMTensorOpConversion : public OpRewritePattern<SrcOpTy> {
};

struct ScatterOpConversion
: public OpRewritePattern<mlir::torch::TMTensor::ScatterOp> {
: OpRewritePattern<mlir::torch::TMTensor::ScatterOp> {
using Base::Base;
LogicalResult matchAndRewrite(mlir::torch::TMTensor::ScatterOp op,
PatternRewriter &rewriter) const override {
Expand Down Expand Up @@ -120,7 +120,7 @@ static SmallVector<AffineMap> getStandardAttentionIndexingMaps(MLIRContext *ctx,
}

struct AttentionOpConversion
: public OpRewritePattern<mlir::torch::TMTensor::AttentionOp> {
: OpRewritePattern<mlir::torch::TMTensor::AttentionOp> {
using Base::Base;
LogicalResult matchAndRewrite(mlir::torch::TMTensor::AttentionOp op,
PatternRewriter &rewriter) const override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ namespace mlir::iree_compiler::TorchInput {

namespace {

struct FftRfftOpConversion
: public OpRewritePattern<torch::Torch::AtenFftRfftOp> {
struct FftRfftOpConversion : OpRewritePattern<torch::Torch::AtenFftRfftOp> {
using Base::Base;
LogicalResult matchAndRewrite(torch::Torch::AtenFftRfftOp op,
PatternRewriter &rewriter) const override {
Expand Down
2 changes: 1 addition & 1 deletion compiler/plugins/input/Torch/InputConversion/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct BackendLegalOps {
};

struct TorchToIREELoweringPipelineOptions
: public PassPipelineOptions<TorchToIREELoweringPipelineOptions> {
: PassPipelineOptions<TorchToIREELoweringPipelineOptions> {
Option<bool> strictSymbolicShapes{
*this, "strict-symbolic-shapes",
llvm::cl::desc("Use strict symbolic shapes."), llvm::cl::init(true)};
Expand Down
5 changes: 2 additions & 3 deletions compiler/plugins/input/Torch/PluginRegistration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ struct TorchOptions {

// The torch plugin provides dialects, passes and opt-in options.
// Therefore, it is appropriate for default activation.
struct TorchSession
: public PluginSession<TorchSession, TorchOptions,
PluginActivationPolicy::DefaultActivated> {
struct TorchSession : PluginSession<TorchSession, TorchOptions,
PluginActivationPolicy::DefaultActivated> {
static void registerPasses() {
mlir::torch::registerTorchPasses();
mlir::torch::registerTorchConversionPasses();
Expand Down
4 changes: 2 additions & 2 deletions compiler/plugins/target/CUDA/CUDATarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,8 @@ class CUDATargetBackend final : public TargetBackend {
};

struct CUDASession final
: public PluginSession<CUDASession, CUDAOptions,
PluginActivationPolicy::DefaultActivated> {
: PluginSession<CUDASession, CUDAOptions,
PluginActivationPolicy::DefaultActivated> {
void populateHALTargetDevices(IREE::HAL::TargetDeviceList &targets) final {
// #hal.device.target<"cuda", ...
targets.add("cuda",
Expand Down
4 changes: 2 additions & 2 deletions compiler/plugins/target/LLVMCPU/LLVMCPUTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,8 @@ class LLVMCPUTargetBackend final : public TargetBackend {
};

struct LLVMCPUSession final
: public PluginSession<LLVMCPUSession, LLVMCPUTargetCLOptions,
PluginActivationPolicy::DefaultActivated> {
: PluginSession<LLVMCPUSession, LLVMCPUTargetCLOptions,
PluginActivationPolicy::DefaultActivated> {
void populateHALTargetBackends(IREE::HAL::TargetBackendList &targets) final {
// #hal.executable.target<"llvm-cpu", ...
// Use session-scoped codegen options bound in createUninitializedSession.
Expand Down
4 changes: 2 additions & 2 deletions compiler/plugins/target/Local/LocalTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ namespace mlir::iree_compiler::IREE::HAL {

namespace {
struct LocalSession
: public PluginSession<LocalSession, IREE::HAL::LocalDevice::Options,
PluginActivationPolicy::DefaultActivated> {
: PluginSession<LocalSession, IREE::HAL::LocalDevice::Options,
PluginActivationPolicy::DefaultActivated> {
void populateHALTargetDevices(IREE::HAL::TargetDeviceList &targets) {
// #hal.device.target<"local", ...
targets.add("local", [=]() {
Expand Down
4 changes: 2 additions & 2 deletions compiler/plugins/target/MetalSPIRV/MetalSPIRVTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ class MetalSPIRVTargetBackend final : public TargetBackend {
};

struct MetalSPIRVSession final
: public PluginSession<MetalSPIRVSession, MetalSPIRVOptions,
PluginActivationPolicy::DefaultActivated> {
: PluginSession<MetalSPIRVSession, MetalSPIRVOptions,
PluginActivationPolicy::DefaultActivated> {
void populateHALTargetDevices(IREE::HAL::TargetDeviceList &targets) final {
// #hal.device.target<"metal", ...
targets.add("metal",
Expand Down
4 changes: 2 additions & 2 deletions compiler/plugins/target/VMVX/VMVXTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ class VMVXInlineTargetBackend final : public TargetBackend {
};

struct VMVXSession final
: public PluginSession<VMVXSession, VMVXOptions,
PluginActivationPolicy::DefaultActivated> {
: PluginSession<VMVXSession, VMVXOptions,
PluginActivationPolicy::DefaultActivated> {
void populateHALTargetBackends(IREE::HAL::TargetBackendList &targets) final {
// #hal.executable.target<"vmvx", ...
targets.add("vmvx",
Expand Down
4 changes: 2 additions & 2 deletions compiler/plugins/target/VulkanSPIRV/VulkanSPIRVTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,8 @@ class VulkanSPIRVTargetBackend final : public TargetBackend {
};

struct VulkanSPIRVSession final
: public PluginSession<VulkanSPIRVSession, VulkanSPIRVTargetOptions,
PluginActivationPolicy::DefaultActivated> {
: PluginSession<VulkanSPIRVSession, VulkanSPIRVTargetOptions,
PluginActivationPolicy::DefaultActivated> {
void populateHALTargetDevices(IREE::HAL::TargetDeviceList &targets) final {
// #hal.device.target<"vulkan", ...
targets.add("vulkan", [&]() {
Expand Down
4 changes: 2 additions & 2 deletions compiler/plugins/target/WebGPUSPIRV/WebGPUSPIRVTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ class WebGPUSPIRVTargetBackend final : public TargetBackend {
};

struct WebGPUSPIRVSession final
: public PluginSession<WebGPUSPIRVSession, WebGPUSPIRVOptions,
PluginActivationPolicy::DefaultActivated> {
: PluginSession<WebGPUSPIRVSession, WebGPUSPIRVOptions,
PluginActivationPolicy::DefaultActivated> {
void populateHALTargetDevices(IREE::HAL::TargetDeviceList &targets) final {
// #hal.device.target<"webgpu", ...
targets.add("webgpu", [=]() {
Expand Down
Loading