-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
164 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
include "Common.td" | ||
|
||
def : InactiveOp<"LLVM", "SIToFPOp">; | ||
def : InactiveOp<"LLVM", "UIToFPOp">; | ||
def : InactiveOp<"LLVM", "FPToSIOp">; | ||
def : InactiveOp<"LLVM", "FPToUIOp">; | ||
def : InactiveOp<"LLVM", "AssumeOp">; | ||
def : InactiveOp<"LLVM", "StackSaveOp">; | ||
def : InactiveOp<"LLVM", "StackRestoreOp">; | ||
def : InactiveOp<"LLVM", "LifetimeStartOp">; | ||
def : InactiveOp<"LLVM", "LifetimeEndOp">; | ||
def : InactiveOp<"LLVM", "Prefetch">; | ||
def : InactiveOp<"LLVM", "MemsetOp">; | ||
|
||
def : InactiveOp<"LLVM", "UndefOp">; | ||
def : InactiveOp<"LLVM", "ConstantOp">; | ||
def : InactiveOp<"LLVM", "UnreachableOp">; |
34 changes: 34 additions & 0 deletions
34
enzyme/Enzyme/MLIR/Implementations/NVVMAutoDiffOpInterfaceImpl.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//===- LLVMAutoDiffOpInterfaceImpl.cpp - Interface external model --------===// | ||
// | ||
// 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 contains the external model implementation of the automatic | ||
// differentiation op interfaces for the upstream LLVM dialect. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "Implementations/CoreDialectsAutoDiffImplementations.h" | ||
#include "Interfaces/AutoDiffOpInterface.h" | ||
#include "Interfaces/AutoDiffTypeInterface.h" | ||
#include "Interfaces/GradientUtils.h" | ||
#include "mlir/Dialect/LLVMIR/NVVMDialect.h" | ||
#include "mlir/IR/DialectRegistry.h" | ||
#include "mlir/Support/LogicalResult.h" | ||
|
||
using namespace mlir; | ||
using namespace mlir::enzyme; | ||
|
||
namespace { | ||
#include "Implementations/NVVMDerivatives.inc" | ||
} // namespace | ||
|
||
void mlir::enzyme::registerNVVMDialectAutoDiffInterface( | ||
DialectRegistry ®istry) { | ||
registry.addExtension(+[](MLIRContext *context, NVVM::NVVMDialect *) { | ||
registerInterfaces(context); | ||
}); | ||
} |
Oops, something went wrong.