add autodiff batching backend
This commit is contained in:
parent
e0c8ead880
commit
b7c63a973f
6 changed files with 196 additions and 44 deletions
|
@ -384,6 +384,12 @@ static inline void AddAttributes(T *t, unsigned Index, LLVMAttributeRef *Attrs,
|
|||
t->setAttributes(PALNew);
|
||||
}
|
||||
|
||||
extern "C" bool LLVMRustHasAttributeAtIndex(LLVMValueRef Fn, unsigned Index,
|
||||
LLVMRustAttributeKind RustAttr) {
|
||||
Function *F = unwrap<Function>(Fn);
|
||||
return F->hasParamAttribute(Index, fromRust(RustAttr));
|
||||
}
|
||||
|
||||
extern "C" void LLVMRustAddFunctionAttributes(LLVMValueRef Fn, unsigned Index,
|
||||
LLVMAttributeRef *Attrs,
|
||||
size_t AttrsLen) {
|
||||
|
@ -636,6 +642,10 @@ static InlineAsm::AsmDialect fromRust(LLVMRustAsmDialect Dialect) {
|
|||
}
|
||||
}
|
||||
|
||||
extern "C" uint64_t LLVMRustGetArrayNumElements(LLVMTypeRef Ty) {
|
||||
return unwrap(Ty)->getArrayNumElements();
|
||||
}
|
||||
|
||||
extern "C" LLVMValueRef
|
||||
LLVMRustInlineAsm(LLVMTypeRef Ty, char *AsmString, size_t AsmStringLen,
|
||||
char *Constraints, size_t ConstraintsLen,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue