1//===-- Passes.td - AMDGPU pass declarations ----*- tablegen -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8// 9// This file declares the passes for the AMDGPU Dialect in MLIR. 10// 11//===----------------------------------------------------------------------===// 12 13#ifndef MLIR_DIALECT_AMDGPU_TRANSFORMS_PASSES_TD_ 14#define MLIR_DIALECT_AMDGPU_TRANSFORMS_PASSES_TD_ 15 16include "mlir/Pass/PassBase.td" 17 18def AmdgpuEmulateAtomicsPass : Pass<"amdgpu-emulate-atomics"> { 19 let summary = "Emulate atomic operations on chipsets that do not support them"; 20 let description = [{ 21 This pass rewrites any AMDGPU-specific atomic operation that is not supported 22 on the given `chipset` into a compare-and-swap loop. 23 }]; 24 let dependentDialects = [ 25 "cf::ControlFlowDialect", 26 "arith::ArithDialect", 27 "vector::VectorDialect" 28 ]; 29 let options = [Option<"chipset", "chipset", "std::string", 30 /*default=*/"\"gfx000\"", 31 "Chipset that these operations will run on">]; 32} 33 34#endif // MLIR_DIALECT_AMDGPU_TRANSFORMS_PASSES_TD_ 35