batchlas::UnsafeSettings Struct Reference

Overview

The overrides that remove a guarantee: setting one can make a correct program crash, hang or silently compute wrong numbers.

Unless the library was built with the CMake option BATCHLAS_ALLOW_UNSAFE_ENV=ON (default OFF), the environment cannot move these fields in their unsafe direction: they keep their safe values and each such variable produces one warning on stderr. configure() is not gated.

Definition at line 452 of file settings.hh.

#include <batchlas/settings.hh>

Enumerations

◆ BlasHealth

Behaviour of the host-dgemm health probe (BATCHLAS_BLAS_HEALTH).

Enumerator
Off 

off: skip the probe; a broken host BLAS then gives silently wrong double results. Gated.

Warn 

warn (default): warn when the probe fails.

Error 

error: throw when the probe fails. Stricter than the default, so not gated.

Definition at line 468 of file settings.hh.

Variables

◆ skip_pointer_checks

bool batchlas::UnsafeSettings::skip_pointer_checks = false

BATCHLAS_SKIP_POINTER_CHECKS: disables the per-argument USM reachability check that turns host memory passed to a device call into an invalid_argument.

Without it such a call dies in the CUDA runtime with no catchable error.

Warning
Any non-empty value whose first character is not 0 disables the checks, so =false, =off and =no all turn them off.

Definition at line 459 of file settings.hh.

◆ latrd_grid_force_unsafe

bool batchlas::UnsafeSettings::latrd_grid_force_unsafe = false

BATCHLAS_LATRD_GRID_FORCE_UNSAFE (env_truthy): lets BATCHLAS_LATRD_GRID_GROUPS exceed the co-residency cap.

Warning
The grid barrier is a spin barrier that relies on co-residency: the kernel can hang (it looks like slow JIT). Run forced measurements under timeout.

Definition at line 465 of file settings.hh.

◆ blas_health

BlasHealth batchlas::UnsafeSettings::blas_health = BlasHealth::Warn

BATCHLAS_BLAS_HEALTH = off | warn | error.

Definition at line 474 of file settings.hh.