jsgrad
Docs
Chat
X
GitHub
DEVICE
WEBGPU
JS
WASM
CLOUD
NULL
DEBUG
BEAM
JIT
NOOPT
CACHELEVEL
Docs
Getting Started
Cloud
API
Index
type
TensorOptions
type
TensorIndice
type
Layer
type
LayerAsync
class
Tensor
function
id
variable
sorted
class
DefaultMap
class
ArrayMap
class
WeakKeyMap
class
WeakValueMap
class
NotImplemented
variable
floatString
variable
constToNumeric
variable
max
variable
min
variable
abs
variable
trunc
variable
sqrt
variable
sin
variable
bigint_sqrt
variable
bigint_sin
variable
next
variable
int_to_bytes
variable
bytes_to_bigint
variable
isInf
class
Enum
variable
random_id
variable
string_to_bytes
variable
bytes_to_string
variable
bytes_to_hex
variable
concat_bytes
function
product
variable
divmod
function
counter
variable
list_str
variable
entries
function
is_less_than
type
ConstType
variable
isConst
variable
is_eq
variable
intersection
function
set_default
function
zip
function
range
variable
tuple
variable
assert
function
permutations
function
is_subset
function
math_gcd
variable
dedup
variable
argsort
variable
all_same
variable
isInt
variable
all_int
variable
colored
variable
colorize_float
variable
memsize_to_str
variable
ansistrip
variable
ansilen
variable
make_tuple
variable
flatten
variable
fully_flatten
variable
strip_parens
variable
round_up
variable
lo32
variable
hi32
variable
data64
variable
data64Le
variable
getbits
variable
i2u
variable
merge_dicts
function
merge_maps
function
merge_sets
variable
partition
variable
get_single_element
variable
unwrap
variable
getChild
variable
word_wrap
variable
to_function_name
class
Metadata
variable
_METADATA
class
GlobalCounters
variable
perf
variable
round
variable
Timing
variable
_format_fcn
class
Profiling
variable
_ensure_downloads_dir
variable
cpu_time_execution
variable
cpu_objdump
variable
capstone_flatdump
function
replace
type
Slice
function
slice
function
cache
function
cache_fn
type
Math
variable
num
variable
add
variable
sub
variable
mul
variable
div
variable
idiv
variable
neg
variable
mod
variable
and
variable
or
variable
xor
variable
lshift
variable
rshift
variable
lt
variable
gt
variable
le
variable
ge
variable
ne
variable
eq
variable
polyN
variable
prod
variable
sum
variable
ceildiv
variable
pow
function
pairwise
function
accumulate
variable
vars
type
FmtStr
variable
bitcast
class
DType
class
PtrDType
class
ImageDType
class
dtypes
type
DTypeLike
variable
to_dtype
variable
promoLattice
variable
_get_recursive_parents
variable
least_upper_dtype
variable
least_upper_float
variable
DTYPES_DICT
variable
INVERSE_DTYPES_DICT
variable
sum_acc_dtype
variable
truncate
type
Variable
type
ConstLike
class
MathTrait
class
Ops
class
GroupOp
variable
view_supported_devices
variable
identity_element
variable
can_pad
variable
END_FOR_UOP
variable
resolve
variable
smax
variable
smin
variable
ssimplify
variable
sym_infer
class
UOp
class
KernelInfo
variable
python_alu
variable
exec_alu
variable
print_uops
type
UPatInput
type
UPatFn
type
Pattern
class
UPat
class
UPatAny
class
PatternMatcher
class
TrackedGraphRewrite
class
TrackedPatternMatcher
variable
launch_viz
class
RewriteContext
variable
graph_rewrite
variable
graph_rewrite_map
variable
spec
variable
type_verify
function
split_uop
variable
div_and_mod_folding
variable
canonicalize_simplex
variable
is_increasing
variable
parse_valid
variable
uop_given_valid
variable
simplify_valid
variable
sint_to_uop
variable
symbolic_simple
variable
symbolic
variable
symbolic_flat
variable
_substitute
variable
renderer
type
sint
variable
merge_views
variable
view_left
variable
TRANSCENDENTAL_SUPPORTED_DTYPES
variable
_lazy_map_numbers
variable
mantissa_bits
variable
exponent_bias
variable
exponent_mask
variable
shr
variable
shl
variable
rintk
variable
pow2if
variable
ilogb2k
variable
ldexp3k
variable
ldexp2k
variable
frexp
variable
payne_hanek_reduction
variable
cody_waite_reduction
variable
trig_poly
variable
sin_poly
variable
sin_poly_small
variable
sin_poly_large
variable
xsin
variable
xexp2
variable
xlog2
variable
fold_expanded
variable
fix_unfoldable_image_load
variable
buf_idx_pat
variable
float4_folding
variable
simplify_valid_load
variable
get_late_rewrite_patterns
variable
threefry2x32
variable
sigmoid_like
variable
loop_collapse
variable
index_collapse
variable
gep_through_wmma
variable
no_vectorized_wmma
variable
reduce_collapse
variable
acc_pat
variable
rng_pat
variable
rng_aug
variable
index_load
variable
arange_augrng
variable
arange_m
variable
mulacc_unrolled
variable
sym
variable
_expand_arg_to_idx
variable
_choices_from_args
variable
_swizzle_args
variable
do_expand
variable
do_contract
variable
no_vectorized_alu
variable
create_gate
variable
expander
variable
no_vectorized_load_store
variable
no_vectorized_acc
variable
devectorize
variable
delete_redundant_gates
variable
load_store_indexing
variable
migrate_indexing
variable
move_mask
variable
pm_render
variable
full_graph_rewrite
class
MNIST
variable
precompute_freqs_cis
variable
complex_mult
variable
apply_rotary_emb
variable
repeat_kv
class
Attention
class
FeedForward
class
TransformerBlock
variable
sample
class
Transformer
variable
convert_from_huggingface
variable
convert_from_gguf
variable
fix_bf16
type
Llama3Size
type
Llama3Quantize
type
Llama3Constructor
type
Llama3Load
type
Llama3StaticLoad
type
Llama3Message
type
Llama3Chat
type
Llama3StopReason
type
Llama3Usage
type
Llama3Response
class
Llama3
variable
LANGUAGES
variable
MODELS
type
WhisperModel
class
MultiHeadAttention
class
ResidualAttentionBlock
class
AudioEncoder
variable
prep_audio
variable
init_whisper
variable
load_file_waveform
variable
transcribe_file
class
Tokenizer
class
_Device
variable
Device
variable
uop_buffer
variable
uop_realized
variable
uop_is_realized
class
Buffer
variable
is_dtype_supported
class
BufferSpec
class
Allocator
class
LRUAllocator
class
_MallocAllocator
variable
MallocAllocator
variable
MAP_JIT
type
ProgramCallArgs
class
Program
class
CPUProgram
class
CompileError
class
Compiler
class
ProfileEvent
class
ProfileDeviceEvent
class
ProfileRangeEvent
class
ProfileGraphEntry
class
ProfileGraphEvent
class
ProfileResult
class
Compiled
class
Model
class
BatchNorm
class
BatchNorm2d
class
BatchNorm3d
class
Conv2d
class
Conv1d
class
ConvTranspose2d
class
ConvTranspose1d
class
Linear
class
GroupNorm
class
InstanceNorm
class
LayerNorm
class
LayerNorm2d
class
RMSNorm
class
Embedding
class
LSTMCell
class
Optimizer
class
OptimizerGroup
class
LARS
class
SGD
class
AdamW
class
Adam
variable
inverse_safe_dtypes
variable
safe_load_metadata
variable
safe_load
variable
safe_save
variable
get_state_dict
variable
get_parameters
variable
replace_state_dict
variable
load_state_dict
variable
tar_extract
variable
ggml_data_to_tensor
variable
gguf_load
variable
mnist
variable
cifar
class
GraphException
variable
apply_graph_to_jit
variable
get_input_replace
class
GraphRunner
class
MultiGraphRunner
variable
update_depends
class
CapturedJit
variable
_prepare_jit_inputs
class
TinyJit
type
RenderBarOptions
type
TqdmProgress
type
TqdmOnProgress
type
TqdmOptions
class
Tqdm
variable
env
variable
setEnv
class
MemoryView
ilogb2k
View in GitHub
calculate the integer part of log2(d), where d is normalized fp value in the range of [0, +inf).
const
ilogb2k
GitHub
= (d:
UOp
) =>
UOp