[Mlir-commits] [llvm] [mlir] [MLIR][NVVM] Add NVVMRequiresSM op trait (PR #126886)
Srinivasa Ravi
llvmlistbot at llvm.org
Wed May 7 23:35:25 PDT 2025
================
@@ -0,0 +1,89 @@
+//===--- NVVMTraits.h - NVVM Traits -----------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines op traits for the NVVM Dialect in MLIR
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef NVVM_DIALECT_NVVM_IR_NVVMTRAITS_H_
+#define NVVM_DIALECT_NVVM_IR_NVVMTRAITS_H_
+
+#include "mlir/IR/OpDefinition.h"
+#include "mlir/IR/StorageUniquerSupport.h"
+#include "llvm/ADT/StringExtras.h"
+
+namespace mlir {
+
+namespace NVVM {
+
+// Structure to store and check compatibility of SM versions.
+struct NVVMCheckSMVersion {
+ int archVersion;
+ bool archAccelerated;
+ bool exactMatch;
+
+ NVVMCheckSMVersion()
----------------
Wolfram70 wrote:
Yes, I am aware of the family specific conditionals introduced in CUDA 12.9 recently. I plan to extend the trait to check for this too in a subsequent PR to this one.
https://github.com/llvm/llvm-project/pull/126886
More information about the Mlir-commits
mailing list