Skip to content

Commit be02039

Browse files
committed
Reverting initial commit
1 parent 8b1c249 commit be02039

File tree

5 files changed

+5
-15
lines changed

5 files changed

+5
-15
lines changed

mlir/include/mlir/Dialect/GPU/Transforms/Passes.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ def GpuNVVMAttachTarget: Pass<"nvvm-attach-target", ""> {
138138
Option<"ftzFlag", "ftz", "bool",
139139
/*default=*/"false",
140140
"Enable flush to zero for denormals.">,
141-
Option<"elfSection", "section", "std::string",
142-
/*default=*/"\"\"",
143-
"ELF section where the module needs to be created.">,
144141
ListOption<"linkLibs", "l", "std::string",
145142
"Extra bitcode libraries paths to link to.">,
146143
];

mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2367,22 +2367,20 @@ def NVVM_TargettAttr : NVVM_Attr<"NVVMTarget", "target"> {
23672367
StringRefParameter<"Target triple.", "\"nvptx64-nvidia-cuda\"">:$triple,
23682368
StringRefParameter<"Target chip.", "\"sm_50\"">:$chip,
23692369
StringRefParameter<"Target chip features.", "\"+ptx60\"">:$features,
2370-
OptionalParameter<"StringAttr", "ELF section.">:$section,
23712370
OptionalParameter<"DictionaryAttr", "Target specific flags.">:$flags,
23722371
OptionalParameter<"ArrayAttr", "Files to link to the LLVM module.">:$link
23732372
);
23742373
let assemblyFormat = [{
2375-
(`<` struct($O, $triple, $chip, $features, $section, $flags, $link)^ `>`)?
2374+
(`<` struct($O, $triple, $chip, $features, $flags, $link)^ `>`)?
23762375
}];
23772376
let builders = [
23782377
AttrBuilder<(ins CArg<"int", "2">:$optLevel,
23792378
CArg<"StringRef", "\"nvptx64-nvidia-cuda\"">:$triple,
23802379
CArg<"StringRef", "\"sm_50\"">:$chip,
23812380
CArg<"StringRef", "\"+ptx60\"">:$features,
2382-
CArg<"StringAttr", "nullptr">:$section,
23832381
CArg<"DictionaryAttr", "nullptr">:$targetFlags,
23842382
CArg<"ArrayAttr", "nullptr">:$linkFiles), [{
2385-
return Base::get($_ctxt, optLevel, triple, chip, features, section, targetFlags, linkFiles);
2383+
return Base::get($_ctxt, optLevel, triple, chip, features, targetFlags, linkFiles);
23862384
}]>
23872385
];
23882386
let skipDefaultBuilders = 1;

mlir/lib/Dialect/GPU/Transforms/NVVMAttachTarget.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ void NVVMAttachTarget::runOnOperation() {
6363
ArrayRef<std::string> libs(linkLibs);
6464
SmallVector<StringRef> filesToLink(libs);
6565
auto target = builder.getAttr<NVVMTargetAttr>(
66-
optLevel, triple, chip, features,
67-
elfSection.empty() ? nullptr : builder.getStringAttr(elfSection),
68-
getFlags(builder),
66+
optLevel, triple, chip, features, getFlags(builder),
6967
filesToLink.empty() ? nullptr : builder.getStrArrayAttr(filesToLink));
7068
llvm::Regex matcher(moduleMatcher);
7169
for (Region &region : getOperation()->getRegions())

mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,8 +1249,8 @@ LogicalResult NVVMDialect::verifyRegionArgAttribute(Operation *op,
12491249
LogicalResult
12501250
NVVMTargetAttr::verify(function_ref<InFlightDiagnostic()> emitError,
12511251
int optLevel, StringRef triple, StringRef chip,
1252-
StringRef features, StringAttr elfSection,
1253-
DictionaryAttr flags, ArrayAttr files) {
1252+
StringRef features, DictionaryAttr flags,
1253+
ArrayAttr files) {
12541254
if (optLevel < 0 || optLevel > 3) {
12551255
emitError() << "The optimization level must be a number between 0 and 3.";
12561256
return failure();

mlir/test/Dialect/LLVMIR/attach-targets.mlir

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
// RUN: mlir-opt %s --nvvm-attach-target='module=nvvm.* O=3 chip=sm_90' --rocdl-attach-target='module=rocdl.* O=3 chip=gfx90a' | FileCheck %s
22
// RUN: mlir-opt %s --nvvm-attach-target='module=options.* O=1 chip=sm_70 fast=true ftz=true' --rocdl-attach-target='module=options.* l=file1.bc,file2.bc wave64=false finite-only=true' | FileCheck %s --check-prefix=CHECK_OPTS
3-
// RUN: mlir-opt %s --nvvm-attach-target='module=nvvm.* section=__fatbin' | FileCheck %s --check-prefix=CHECK_SECTION
43

54
module attributes {gpu.container_module} {
65
// Verify the target is appended.
76
// CHECK: @nvvm_module_1 [#nvvm.target<O = 3, chip = "sm_90">] {
8-
// CHECK_SECTION: @nvvm_module_1 [#nvvm.target<section = "__fatbin">]
97
gpu.module @nvvm_module_1 {
108
}
119
// Verify the target is appended.
1210
// CHECK: @nvvm_module_2 [#nvvm.target<chip = "sm_60">, #nvvm.target<O = 3, chip = "sm_90">] {
13-
// CHECK_SECTION: gpu.module @nvvm_module_2 [#nvvm.target<chip = "sm_60">, #nvvm.target<section = "__fatbin">]
1411
gpu.module @nvvm_module_2 [#nvvm.target<chip = "sm_60">] {
1512
}
1613
// Verify the target is not added multiple times.

0 commit comments

Comments
 (0)