lightning-thunder icon indicating copy to clipboard operation
lightning-thunder copied to clipboard

Implement _VariableFunctionsClass.randint of torch

Open athitten opened this issue 2 years ago • 5 comments

🚀 Feature

Implement _VariableFunctionsClass.randint

Motivation

NeMo Stable Diffusion

cc @tfogal

athitten avatar Apr 24 '24 17:04 athitten

triage team: what guarantees do we need to provide w.r.t. the generated random numbers? i.e. do we need to match torch exactly, match the same distribution, merely respect the low/high parameters?

NeMo does occasionally use the dtype parameter, and sometimes it's even float32 or similar instead of some integer. We might want to map this an RNG op + a cast.

tfogal avatar May 01 '24 16:05 tfogal

triage review — we currently don't require matching anything; we would accept an implementation of randint that calls PyTorch's randint

mruberry avatar May 06 '24 19:05 mruberry

Hi.. I would like to work on this.. is the work still in progress?

aditya-167 avatar Jul 26 '24 02:07 aditya-167

Hi.. I would like to work on this.. is the work still in progress?

Yep! No one is currently working on this. It'd be great to see a PR

mruberry avatar Jul 30 '24 18:07 mruberry

go for it @aditya-167!

lantiga avatar Jul 30 '24 21:07 lantiga