For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
nan_check_count
def nan_check_count[dtype: DType, //](nan_count_out: TileTensor[.int32, Engine=nan_count_out.Engine, address_space=nan_count_out.address_space, linear_idx_type=nan_count_out.linear_idx_type], inf_count_out: TileTensor[.int32, Engine=inf_count_out.Engine, address_space=inf_count_out.address_space, linear_idx_type=inf_count_out.linear_idx_type], input: TileTensor[dtype, Engine=input.Engine, address_space=input.address_space, linear_idx_type=input.linear_idx_type], ctx: DeviceContext)
Counts NaN/Inf values in a floating-point tensor.
Read-only: does not modify the input tensor. Outputs two single-element int32 tensors with the NaN and Inf counts. No D2H transfer or synchronization is performed: the counts stay on the same device as the input.