Skip to content

Using fallback BLAS replacements for cblas_zdotc_sub64_ and dznrm2_64_ #2349

@albertomercurio

Description

@albertomercurio

Hello,

the following code generates the BLAS warning

using Enzyme
using LinearAlgebra

function my_fidelity2(p)
  ψg = zeros(ComplexF64, 2)
  ψg[2] = 1.0
  ψe = zeros(ComplexF64, 2)
  ψe[1] = 1.0

  ψgg = kron(ψg, ψg)
  ψee = kron(ψe, ψe)
  ψ = normalize(p[1] * ψgg + p[2] * ψee)

  return abs(dot(ψ, ψgg))
end

##

p = [0.3, 0.4]
my_fidelity2(p) # 0.6

Enzyme.gradient(Reverse, my_fidelity2, p) # ([1.28, -0.96],)

And the warning

┌ Warning: Using fallback BLAS replacements for (["cblas_zdotc_sub64_", "dznrm2_64_"]), performance may be degraded
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/2MI6e/src/utils.jl:61

Also, why is it related to the GPUCompiler?

Metadata

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