Skip to content

Code coverage bug on line 6 of src/macrokernel.jl #15

@DilumAluthge

Description

@DilumAluthge

Here's coverage for src/macrokernel.jl. Observe the 0 on line 6:

- """
- The macrokernel. It iterates over our tiles, and applies the microkernel.
- """
17 function macrokernel!(C, A, B, α, β)
17     iszero(β) && return macrokernel!(C, A, B, α, StaticInt{0}())
0     LoopVectorization.@avx for n ∈ axes(C,2), m ∈ axes(C,1)
1         Cmn = zero(eltype(C))
1         for k ∈ axes(B,1)
1             Cmn += A[m,k] * B[k,n]
-         end
-         # C[m,n] may be `NaN`, but if `β == 0` we still want to zero it
1         C[m,n] = (α * Cmn) + β * C[m,n]
-     end
- end
16 function macrokernel!(C, A, B, α, ::StaticInt{0})
16     LoopVectorization.@avx for n ∈ axes(C,2), m ∈ axes(C,1)
16         Cmn = zero(eltype(C))
16         for k ∈ axes(B,1)
16             Cmn += A[m,k] * B[k,n]
-         end
-         # C[m,n] may be `NaN`, but if `β == 0` we still want to zero it
16         C[m,n] = (α * Cmn)
-     end
- end

Any idea what's going on? Why is the line with @avx not getting covered?

I thought maybe the issue was having both the for n and for m on the same line, so I moved the for m onto the next line. But that doesn't change anything. Here's the coverage from that experiment. As you can see, there is still a 0 on line 6:

- """
- The macrokernel. It iterates over our tiles, and applies the microkernel.
- """
17 function macrokernel!(C, A, B, α, β)
17     iszero(β) && return macrokernel!(C, A, B, α, StaticInt{0}())
0     LoopVectorization.@avx for n ∈ axes(C,2)
1         for m ∈ axes(C,1)
1             Cmn = zero(eltype(C))
1             for k ∈ axes(B,1)
1                 Cmn += A[m,k] * B[k,n]
-             end
-             # C[m,n] may be `NaN`, but if `β == 0` we still want to zero it
1             C[m,n] = (α * Cmn) + β * C[m,n]
-         end
-     end
- end
16 function macrokernel!(C, A, B, α, ::StaticInt{0})
16     LoopVectorization.@avx for n ∈ axes(C,2), m ∈ axes(C,1)
16         Cmn = zero(eltype(C))
16         for k ∈ axes(B,1)
16             Cmn += A[m,k] * B[k,n]
-         end
-         # C[m,n] may be `NaN`, but if `β == 0` we still want to zero it
16         C[m,n] = (α * Cmn)
-     end
- end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions