From 3affcb7d62f310197c1d4a5366e80070d46ed6fc Mon Sep 17 00:00:00 2001 From: "Klamkin, Michael" Date: Thu, 24 Jul 2025 13:34:25 -0400 Subject: [PATCH 1/3] badge --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 840ba4a..85ae1e6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # BatchNLPKernels.jl -[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://LearningToOptimize.github.io/BatchNLPKernels.jl/dev/) -[![Build Status](https://github.com/LearningToOptimize/BatchNLPKernels.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/LearningToOptimize/BatchNLPKernels.jl/actions/workflows/CI.yml?query=branch%3Amain) +[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://klamike.github.io/BatchNLPKernels.jl/dev/) +[![Build Status](https://github.com/klamike/BatchNLPKernels.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/klamike/BatchNLPKernels.jl/actions/workflows/CI.yml?query=branch%3Amain) +[![Coverage](https://codecov.io/gh/LearningToOptimize/BatchNLPKernels.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/LearningToOptimize/BatchNLPKernels.jl) `BatchNLPKernels.jl` provides [`KernelAbstractions.jl`](https://github.com/JuliaGPU/KernelAbstractions.jl) kernels for evaluating problem data from a (parametric) [`ExaModel`](https://github.com/exanauts/ExaModels.jl) for batches of solutions (and parameters). Currently the following functions (as well as their non-parametric variants) are exported: From 4aa2ca685add1556dcfbd514d77deeefff867d24 Mon Sep 17 00:00:00 2001 From: "Klamkin, Michael" Date: Thu, 24 Jul 2025 13:55:12 -0400 Subject: [PATCH 2/3] exclude kernels.jl --- src/kernels.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/kernels.jl b/src/kernels.jl index 743f75e..27ee83b 100644 --- a/src/kernels.jl +++ b/src/kernels.jl @@ -1,3 +1,5 @@ +## COV_EXCL_START + @kernel function kerf_batch(Y, @Const(f), @Const(itr), @Const(X), @Const(Θ)) I, batch_idx = @index(Global, NTuple) @inbounds Y[ExaModels.offset0(f, itr, I), batch_idx] = f.f(itr[I], view(X, :, batch_idx), view(Θ, :, batch_idx)) @@ -102,4 +104,6 @@ end Y[j, batch_idx] += V[ind, batch_idx] * X[i, batch_idx] end end -end \ No newline at end of file +end + +## COV_EXCL_STOP \ No newline at end of file From 229b8de73b76fe99159bae5b7759b4c278dbd3bd Mon Sep 17 00:00:00 2001 From: "Klamkin, Michael" Date: Thu, 24 Jul 2025 14:03:33 -0400 Subject: [PATCH 3/3] test empty intervals --- src/interval.jl | 1 - test/runtests.jl | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/interval.jl b/src/interval.jl index fd884f5..d31c7ba 100644 --- a/src/interval.jl +++ b/src/interval.jl @@ -15,7 +15,6 @@ Base.broadcastable(s::Interval) = Ref(s) Base.isempty(s::Interval{VT}) where {VT} = isempty(s.l) || isempty(s.u) # empty support (unconstrained) -Interval(::Nothing) = Interval() Interval() = Interval(nothing, nothing) Base.isempty(::Interval{Nothing}) = true @inline _violation(v, ::Interval{Nothing}) = zero(v) diff --git a/test/runtests.jl b/test/runtests.jl index 1b1dfd1..2bc5b19 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -38,6 +38,13 @@ if haskey(ENV, "BNK_TEST_CUDA") @info "CUDA detected" end +@testset "Empty Intervals" begin + empt = BNK.Interval() + @test isempty(empt) + @test isnothing(empt.l) + @test isnothing(empt.u) + @test BNK._violation([1.0, 2.0, 3.0], empt) == [0.0, 0.0, 0.0] +end include("luksan.jl") include("power.jl")