Skip to documentation
SLOP

tiny.accy.kernel.library.random.base

Reference tiny.accy kernel library random base

Defined in kernel.library.random.

API (18)

Actions

Public operations.

Types and contracts

Public types and contracts.

Namespaces

Public namespaces.

Values and defaults

Public values and defaults.

No direct callersNo direct callskernel.library.randombase
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Called byCallsNo direct callskernel.library.randomcreatePhiloxFamilyArtifactkernel.library.randomcreateThreefryFamilyArtifactkernel.library.random.baserandomDerivedLaunch
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callskernel.library.randomcreateFeistelFamilyArtifactkernel.library.randomcreatePhiloxFoldFamilyArtifactkernel.library.randomcreateSquaresFoldFamilyArtifactkernel.library.randomcreateThreefryFoldFamilyArtifactkernel.library.randomcreatePhiloxKeyCounterUniformFamilyAr...+3 morekernel.library.random.baserandomFoldDerivedLaunch
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callskernel.library.random.baserandomShapeFamilykernel.library.randomfeistelShapeProfileDimensionskernel.library.randomphiloxFoldShapeProfileDimensionskernel.library.randomsquaresFoldShapeProfileDimensionskernel.library.randomthreefryFoldShapeProfileDimensions+6 morekernel.library.random.baserandomRuntimeExtentBounds
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallskernel.library.randomfeistelShapeFamilykernel.library.randomphiloxFoldFamilyFingerprintkernel.library.randomsquaresFoldFamilyFingerprintkernel.library.randomthreefryFoldFamilyFingerprintkernel.library.randomphiloxKeyCounterUniformShapeFamily+5 morekernel.library.random.baserandomRuntimeExtentBoundskernel.library.random.baserandomShapeFamily
Static calls · unresolved targets: 0 · external targets: 7.

Source: lib/accy/src/kernel/library/random/base.zig

zig
const choir_abi = @import("choir_abi");pub const std = @import("std");pub const artifact_product = @import("../../../artifact/model/root.zig");pub const shape = @import("../../../choir/shape/root.zig");pub const library = @import("../root.zig");pub const kernel = @import("../../root.zig");pub const entry = library.entry;pub const extent_mod = library.extent;pub const geometry_mod = library.geometry;pub const tuning = library.tuning;pub const DType = choir_abi.DType;pub const indexExtent = extent_mod.indexExtent;pub const runtimeExtentArgument = extent_mod.runtimeExtentArgument;pub const random_thread_caps = geometry_mod.ThreadCaps1D{};pub fn randomRuntimeExtentBounds() shape.Bounds {    return .{ .min = 1, .max = extent_mod.runtime_extent_max };}pub fn randomDerivedLaunch(threads: u32, lanes: u64) !artifact_product.KernelCallLaunch {    if (threads == 0) return error.KernelLibraryLaunchThreadgroupMustBeNonzero;    const divisor = std.math.cast(u32, @as(u64, threads) * lanes) orelse        return error.KernelLibraryLaunchThreadgroupMustBeNonzero;    return .{ .derived = .{        .grid = .{            .{ .runtime_u32_ceil_div = .{ .argument_index = 0, .divisor = divisor } },            .{ .fixed = 1 },            .{ .fixed = 1 },        },        .threadgroup = .{ threads, 1, 1 },    } };}pub fn randomFoldDerivedLaunch(threads: u32) !artifact_product.KernelCallLaunch {    if (threads == 0) return error.KernelLibraryLaunchThreadgroupMustBeNonzero;    return .{ .derived = .{        .grid = .{            .{ .runtime_u32_ceil_div = .{ .argument_index = 0, .divisor = threads } },            .{ .fixed = 1 },            .{ .fixed = 1 },        },        .threadgroup = .{ threads, 1, 1 },    } };}pub fn randomShapeFamily(backing_allocator: std.mem.Allocator, name: []const u8, count_axis: []const u8) !shape.Family {    var builder = try shape.Builder.init(backing_allocator, name);    errdefer builder.deinit();    const count = try builder.symbol(count_axis);    const count_expr = try builder.symbolExpression(count);    _ = try builder.tensor("out", &.{count_expr});    try builder.assumeBounds(count_expr, randomRuntimeExtentBounds());    return builder.finish();}pub fn ceilDivComptime(comptime numerator: u64, comptime denominator: u32) u32 {    return @intCast(numerator / denominator + @as(u64, @intFromBool(numerator % denominator != 0)));}

Source: lib/accy/src/kernel/library/random/root.zig:1

zig
pub const base = @import("base.zig");

Complete caller list for kernel.library.random.base.randomFoldDerivedLaunch

8 direct callers.

Complete caller list for kernel.library.random.base.randomRuntimeExtentBounds

11 direct callers.

Complete caller list for kernel.library.random.base.randomShapeFamily

10 direct callers.

Audit

Definitions9
Public names9
Members0
Version26.7.0
Revisiondaab053ee433