Skip to content

Enzyme cast shadow argument error #187

Open

Description

Enzyme cast shadow argument error

[compiler/rustc_codegen_llvm/src/back/write.rs:1234:9] "Running Module Optimization after differentiation" = "Running Module Optimization after differentiation"
error: <unknown>:0:0: in function _ZN3opt5dcart17h15b297d77510e859E void (ptr, i64, ptr, i64, ptr, ptr, i64, i32, ptr, i64, i32, ptr, i64): Enzyme: Cannot cast __enzyme_autodiff shadow argument 3, found i64 %1, type i64 - to arg 0 ptr

Here is the function header and autodiff macros

#![feature(autodiff)]

use std::autodiff::autodiff;

#[no_mangle]
#[autodiff(dcart, Reverse, Duplicated, Const, Const, Const, Const, Const, Duplicated)]
fn cart(
    out: &mut [f64],
    shls: [i32; 4],
    atm: &mut [i32],
    natm: i32,
    bas: &mut [i32],
    nbas: i32,
    env: &mut [f64],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions