Skip to content

__device__ globals refuse for want of a data segment #131

Description

@Zaneham

BIR_GLOBAL_REF refuses on the RV32 path. Computing the address is the easy part; the problem is that nothing initialises it. The ELF has a single PT_LOAD and no .data, and the kernel is a bare function that never runs a crt1 to stage an image, so any pointer would reference uninitialised L1. Even a zero-init global would be wrong, since L1 is not guaranteed zero.

Needs a second PT_LOAD, a matching .segments triple for it, and a decision about who copies it into place before the kernel runs. tt-metal's own answer is do_crt1 in hw/inc/internal/firmware_common.h, which the kernel calls itself with __kernel_data_lma.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend: TensixTenstorrent Tensix / Metalium backendenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions