MCPcopy Create free account

hub / github.com/AlphaGPU/leetgpu-challenges / functions

Functions919 in github.com/AlphaGPU/leetgpu-challenges

Methodreference_impl
Reference implementation that finds the nearest neighbor for each point. For N three-dimensional points, fills indices[i] with the in
challenges/medium/38_nearest_neighbor/challenge.py:15
Methodreference_impl
(self, A: torch.Tensor, B: torch.Tensor, result: torch.Tensor, N: int)
challenges/medium/58_fp16_dot_product/challenge.py:15
Methodreference_impl
( self, A: torch.Tensor, B: torch.Tensor, C: torch.Tensor, M: int, N: int, K: int )
challenges/easy/2_matrix_multiplication/challenge.py:15
Methodreference_impl
( self, input: torch.Tensor, output: torch.Tensor, lo: float, hi: float, N: int )
challenges/easy/62_value_clipping/challenge.py:15
Methodreference_impl
(self, input: torch.Tensor, output: torch.Tensor, N: int, R: int)
challenges/easy/24_rainbow_table/challenge.py:26
Methodreference_impl
(self, input: torch.Tensor, output: torch.Tensor, N: int)
challenges/easy/23_leaky_relu/challenge.py:15
Methodreference_impl
( self, input: torch.Tensor, kernel: torch.Tensor, output: torch.Tensor,
challenges/easy/9_1d_convolution/challenge.py:15
Methodreference_impl
(self, input: torch.Tensor, N: int)
challenges/easy/19_reverse_array/challenge.py:15
Methodreference_impl
(self, input: torch.Tensor, output: torch.Tensor, N: int)
challenges/easy/54_swiglu/challenge.py:15
Methodreference_impl
(self, X: torch.Tensor, Y: torch.Tensor, N: int)
challenges/easy/68_sigmoid/challenge.py:15
Methodreference_impl
(self, input: torch.Tensor, model: nn.Module, output: torch.Tensor)
challenges/easy/41_simple_inference/challenge.py:15
Methodreference_impl
(self, input: torch.Tensor, output: torch.Tensor, N: int)
challenges/easy/65_geglu/challenge.py:16
Methodreference_impl
(self, A: torch.Tensor, B: torch.Tensor, output: torch.Tensor, N: int)
challenges/easy/63_interleave/challenge.py:15
Methodreference_impl
(self, input: torch.Tensor, output: torch.Tensor, rows: int, cols: int)
challenges/easy/3_matrix_transpose/challenge.py:15
Methodreference_impl
(self, input: torch.Tensor, output: torch.Tensor, N: int)
challenges/easy/21_relu/challenge.py:15
Methodreference_impl
(self, input: torch.Tensor, output: torch.Tensor, N: int)
challenges/easy/52_silu/challenge.py:15
Methodreference_impl
(self, A: torch.Tensor, B: torch.Tensor, C: torch.Tensor, N: int)
challenges/easy/1_vector_add/challenge.py:15
Methodreference_impl
(self, input: torch.Tensor, output: torch.Tensor, width: int, height: int)
challenges/easy/66_rgb_to_grayscale/challenge.py:15
Methodreference_impl
(self, A: torch.Tensor, B: torch.Tensor, N: int)
challenges/easy/31_matrix_copy/challenge.py:15
Methodreference_impl
(self, A: torch.Tensor, B: torch.Tensor, C: torch.Tensor, N: int)
challenges/easy/8_matrix_addition/challenge.py:15
Methodreference_impl
(self, image: torch.Tensor, width: int, height: int)
challenges/easy/7_color_inversion/challenge.py:15
Methodreference_impl_jax
(self, x, weights, seq_len)
challenges/hard/74_gpt2_block/challenge.py:99
Methodreference_impl_jax
(self, dist, N)
challenges/hard/73_all_pairs_shortest_paths/challenge.py:40
Methodreference_impl_jax
(self, Q, K, V, M, d, window_size)
challenges/hard/59_sliding_window_attn/challenge.py:37
Methodreference_impl_jax
(self, x, weights, cos, sin, seq_len)
challenges/hard/93_llama_transformer_block/challenge.py:125
Methodreference_impl_jax
(self, agents, N)
challenges/hard/14_multi_agent_sim/challenge.py:42
Methodreference_impl_jax
( self, data_x, data_y, initial_centroid_x, initial_centroid_y, sample_size, k, max_iterations )
challenges/hard/20_kmeans_clustering/challenge.py:48
Methodreference_impl_jax
(self, Q, K, V, M, d)
challenges/hard/56_linear_attention/challenge.py:41
Methodreference_impl_jax
(self, Q, K, V, N, d_model, h)
challenges/hard/12_multi_head_attention/challenge.py:43
Methodreference_impl_jax
(self, Q, K, V, M, d)
challenges/hard/53_casual_attention/challenge.py:33
Methodreference_impl_jax
(self, Q, K, V, M, N, d, alpha)
challenges/medium/55_attn_w_linear_bias/challenge.py:43
Methodreference_impl_jax
( self, A, B, M, N, K, scale_A, scale_B, scale_C, zero_point_A, zero_point_B, zero_point_C )
challenges/medium/32_int8_quantized_matmul/challenge.py:40
Methodreference_impl_jax
(self, Q, K, V, num_q_heads, num_kv_heads, seq_len, head_dim)
challenges/medium/80_grouped_query_attention/challenge.py:51
Methodreference_impl_jax
(self, a, x, B, L)
challenges/medium/82_linear_recurrence/challenge.py:34
Methodreference_impl_jax
(self, Q, K, V, seq_len, d_model, gamma)
challenges/medium/92_decaying_causal_attention/challenge.py:42
Methodreference_impl_jax
(self, x, W_gate, W_up, W_down, M, d_model, d_ffn)
challenges/medium/84_swiglu_mlp_block/challenge.py:41
Methodreference_impl_jax
(self, logits, true_labels, N, C)
challenges/medium/25_categorical_cross_entropy_loss/challenge.py:36
Methodreference_impl_jax
(self, A, B, M, N, K, nnz)
challenges/medium/75_sparse_matrix_dense_matrix_multiplication/challenge.py:49
Methodreference_impl_jax
(self, u, delta, A, B, C, skip, batch, seq_len, d_model, d_state)
challenges/medium/94_ssm_selective_scan/challenge.py:65
Methodreference_impl_jax
(self, input, kernel, input_rows, input_cols, kernel_rows, kernel_cols)
challenges/medium/10_2d_convolution/challenge.py:37
Methodreference_impl_jax
(self, x, w_q, scales, M, N, K, group_size)
challenges/medium/81_int4_matmul/challenge.py:55
Methodreference_impl_jax
(self, x, W, A, B, batch, d_in, d_out, rank, lora_scale)
challenges/medium/85_lora_linear/challenge.py:44
Methodreference_impl_jax
(self, Q, K_int8, V_int8, k_scale, v_scale, num_heads, seq_len, head_dim)
challenges/medium/96_int8_kv_cache_attention/challenge.py:55
Methodreference_impl_jax
(self, draft_tokens, draft_probs, target_probs, uniform_samples, B, T, V)
challenges/medium/87_speculative_decoding_verification/challenge.py:68
Methodreference_impl_jax
(self, x, weight, bias, B, L, D, K)
challenges/medium/90_causal_depthwise_conv1d/challenge.py:49
Methodreference_impl_jax
(self, prompts, weights, batch_size)
challenges/medium/76_adder_transformer/challenge.py:207
Methodreference_impl_jax
( self, input, kernel, input_depth, input_rows, input_cols,
challenges/medium/11_3d_convolution/challenge.py:46
Methodreference_impl_jax
(self, A, B, C, M, N, K, alpha, beta)
challenges/medium/22_gemm/challenge.py:36
Methodreference_impl_jax
(self, points, N)
challenges/medium/38_nearest_neighbor/challenge.py:46
Methodreference_impl_jax
(self, A, B, M, N, K)
challenges/easy/2_matrix_multiplication/challenge.py:26
Methodreference_impl_jax
(self, input, kernel, input_size, kernel_size)
challenges/easy/9_1d_convolution/challenge.py:36
Functionrelu_kernel
(input, output, n_elements, BLOCK_SIZE: tl.constexpr)
challenges/easy/21_relu/starter/starter.triton.py:7
Functionreverse_kernel
(input, N, BLOCK_SIZE: tl.constexpr)
challenges/easy/19_reverse_array/starter/starter.triton.py:7
Functionrgb_to_grayscale_kernel
(input, output, width, height, BLOCK_SIZE: tl.constexpr)
challenges/easy/66_rgb_to_grayscale/starter/starter.triton.py:7
Methodrms_norm
(z, w)
challenges/hard/93_llama_transformer_block/challenge.py:55
Functionsigmoid_kernel
(x_ptr, y_ptr, n_elements, BLOCK_SIZE: tl.constexpr)
challenges/easy/68_sigmoid/starter/starter.triton.py:7
Functionsilu_kernel
(input, output, n_elements, BLOCK_SIZE: tl.constexpr)
challenges/easy/52_silu/starter/starter.triton.py:7
Functionsoftmax_kernel
(input, output, N, BLOCK_SIZE: tl.constexpr)
challenges/medium/5_softmax/starter/starter.triton.py:7
Functionsolve
(signal: jax.Array, N: int)
challenges/hard/39_Fast_Fourier_transform/starter/starter.jax.py:7
Functionsolve
(signal: torch.Tensor, spectrum: torch.Tensor, N: int)
challenges/hard/39_Fast_Fourier_transform/starter/starter.triton.py:7
Functionsolve
(signal: torch.Tensor, spectrum: torch.Tensor, N: int)
challenges/hard/39_Fast_Fourier_transform/starter/starter.pytorch.py:5
Functionsolve
(signal: cute.Tensor, spectrum: cute.Tensor, N: cute.Int32)
challenges/hard/39_Fast_Fourier_transform/starter/starter.cute.py:7
Functionsolve
(x: jax.Array, weights: jax.Array, seq_len: int)
challenges/hard/74_gpt2_block/starter/starter.jax.py:7
Functionsolve
(x: torch.Tensor, output: torch.Tensor, weights: torch.Tensor, seq_len: int)
challenges/hard/74_gpt2_block/starter/starter.triton.py:7
Functionsolve
(x: torch.Tensor, output: torch.Tensor, weights: torch.Tensor, seq_len: int)
challenges/hard/74_gpt2_block/starter/starter.pytorch.py:5
Functionsolve
( x: cute.Tensor, output: cute.Tensor, weights: cute.Tensor, seq_len: cute.Int32, )
challenges/hard/74_gpt2_block/starter/starter.cute.py:7
Functionsolve
(dist: jax.Array, N: int)
challenges/hard/73_all_pairs_shortest_paths/starter/starter.jax.py:7
Functionsolve
(dist: torch.Tensor, output: torch.Tensor, N: int)
challenges/hard/73_all_pairs_shortest_paths/starter/starter.triton.py:7
Functionsolve
(dist: torch.Tensor, output: torch.Tensor, N: int)
challenges/hard/73_all_pairs_shortest_paths/starter/starter.pytorch.py:5
Functionsolve
(dist: cute.Tensor, output: cute.Tensor, N: cute.Int32)
challenges/hard/73_all_pairs_shortest_paths/starter/starter.cute.py:7
Functionsolve
(Q: jax.Array, K: jax.Array, V: jax.Array, M: int, d: int, window_size: int)
challenges/hard/59_sliding_window_attn/starter/starter.jax.py:7
Functionsolve
( Q: torch.Tensor, K: torch.Tensor, V: torch.Tensor, output: torch.Tensor, M: int, d:
challenges/hard/59_sliding_window_attn/starter/starter.triton.py:7
Functionsolve
( Q: torch.Tensor, K: torch.Tensor, V: torch.Tensor, output: torch.Tensor, M: int, d:
challenges/hard/59_sliding_window_attn/starter/starter.pytorch.py:5
Functionsolve
( Q: cute.Tensor, K: cute.Tensor, V: cute.Tensor, output: cute.Tensor, M: int, d: int,
challenges/hard/59_sliding_window_attn/starter/starter.cute.py:7
Functionsolve
( x: jax.Array, weights: jax.Array, cos: jax.Array, sin: jax.Array, seq_len: int, )
challenges/hard/93_llama_transformer_block/starter/starter.jax.py:7
Functionsolve
( x: torch.Tensor, output: torch.Tensor, weights: torch.Tensor, cos: torch.Tensor, sin: to
challenges/hard/93_llama_transformer_block/starter/starter.triton.py:7
Functionsolve
( x: torch.Tensor, output: torch.Tensor, weights: torch.Tensor, cos: torch.Tensor, sin: to
challenges/hard/93_llama_transformer_block/starter/starter.pytorch.py:5
Functionsolve
( x: cute.Tensor, output: cute.Tensor, weights: cute.Tensor, cos: cute.Tensor, sin: cute.T
challenges/hard/93_llama_transformer_block/starter/starter.cute.py:7
Functionsolve
(agents: jax.Array, N: int)
challenges/hard/14_multi_agent_sim/starter/starter.jax.py:7
Functionsolve
(agents: torch.Tensor, agents_next: torch.Tensor, N: int)
challenges/hard/14_multi_agent_sim/starter/starter.triton.py:7
Functionsolve
(agents: torch.Tensor, agents_next: torch.Tensor, N: int)
challenges/hard/14_multi_agent_sim/starter/starter.pytorch.py:5
Functionsolve
(agents: cute.Tensor, agents_next: cute.Tensor, N: cute.Int32)
challenges/hard/14_multi_agent_sim/starter/starter.cute.py:7
Functionsolve
(data: jax.Array, N: int)
challenges/hard/15_sorting/starter/starter.jax.py:7
Functionsolve
(data: torch.Tensor, N: int)
challenges/hard/15_sorting/starter/starter.triton.py:7
Functionsolve
(data: torch.Tensor, N: int)
challenges/hard/15_sorting/starter/starter.pytorch.py:5
Functionsolve
(data: cute.Tensor, N: cute.Int32)
challenges/hard/15_sorting/starter/starter.cute.py:7
Functionsolve
( data_x: jax.Array, data_y: jax.Array, initial_centroid_x: jax.Array, initial_centroid_y: jax
challenges/hard/20_kmeans_clustering/starter/starter.jax.py:7
Functionsolve
( data_x: torch.Tensor, data_y: torch.Tensor, labels: torch.Tensor, initial_centroid_x: torch.
challenges/hard/20_kmeans_clustering/starter/starter.triton.py:8
Functionsolve
( data_x: torch.Tensor, data_y: torch.Tensor, labels: torch.Tensor, initial_centroid_x: torch.
challenges/hard/20_kmeans_clustering/starter/starter.pytorch.py:6
Functionsolve
( data_x: cute.Tensor, data_y: cute.Tensor, labels: cute.Tensor, initial_centroid_x: cute.Tens
challenges/hard/20_kmeans_clustering/starter/starter.cute.py:8
Functionsolve
(Q: jax.Array, K: jax.Array, V: jax.Array, M: int, d: int)
challenges/hard/56_linear_attention/starter/starter.jax.py:7
Functionsolve
(Q: torch.Tensor, K: torch.Tensor, V: torch.Tensor, output: torch.Tensor, M: int, d: int)
challenges/hard/56_linear_attention/starter/starter.triton.py:7
Functionsolve
(Q: torch.Tensor, K: torch.Tensor, V: torch.Tensor, output: torch.Tensor, M: int, d: int)
challenges/hard/56_linear_attention/starter/starter.pytorch.py:5
Functionsolve
( Q: cute.Tensor, K: cute.Tensor, V: cute.Tensor, output: cute.Tensor, M: cute.Int32,
challenges/hard/56_linear_attention/starter/starter.cute.py:7
Functionsolve
(Q: jax.Array, K: jax.Array, V: jax.Array, N: int, d_model: int, h: int)
challenges/hard/12_multi_head_attention/starter/starter.jax.py:7
Functionsolve
( Q: torch.Tensor, K: torch.Tensor, V: torch.Tensor, output: torch.Tensor, N: int, d_m
challenges/hard/12_multi_head_attention/starter/starter.triton.py:7
Functionsolve
( Q: torch.Tensor, K: torch.Tensor, V: torch.Tensor, output: torch.Tensor, N: int, d_m
challenges/hard/12_multi_head_attention/starter/starter.pytorch.py:5
Functionsolve
( Q: cute.Tensor, K: cute.Tensor, V: cute.Tensor, output: cute.Tensor, N: cute.Int32,
challenges/hard/12_multi_head_attention/starter/starter.cute.py:7
Functionsolve
(input: jax.Array, N: int)
challenges/hard/36_radix_sort/starter/starter.jax.py:7
Functionsolve
(input: torch.Tensor, output: torch.Tensor, N: int)
challenges/hard/36_radix_sort/starter/starter.triton.py:13
← previousnext →501–600 of 919, ranked by callers