JuliaGPU / JuliaGPU/cuTile.jl

Restricted numeric types inherit fallback arithmetic methods

Open
#240 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
86
Forks
12
Avg merge
8h 24m
Merged PRs (30d)
7

Description

Noticed broadcasting operations over narrow precision tiles will inherit any generic upstream methods with implicit up-casting to `Float32` at e.g.:

https://github.com/chengchingwen/DLFP8Types.jl/blob/dcd9135cbe44cef45394a9c5cb6417a91beab7b9/src/DLFP8Types.jl#L162-L166

Going against the notion of the narrow precision types being restricted, non-arithmetic, numeric-only types, like `TFloat32` (which doesn't have such methods). DLFP8TypesExt and MicrofloatsExt could register FP8/FP4 as restricted

https://github.com/JuliaGPU/cuTile.jl/blob/69bcd7ea42093a3b90b4956993d0f8f4564ed995/src/language/types.jl#L446-L461

and then we can have broadcasting honor it to explicitly disallow this implicit up-casting.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read src/language/types.jl around lines 446-461 and compare its restricted-type registration with the DLFP8Types.jl reference around lines 162-166. Trace the broadcasting behavior for FP8/FP4 types, then verify that restricted numeric types no longer inherit generic methods that implicitly up-cast to Float32.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.