Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions problems/bioml/trimul/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ def generate_input(
# Generate input tensor based on distribution
if distribution == "cauchy":
# Heavier tail distribution
input_tensor = torch.distributions.Cauchy(0, 2).sample(
zero = torch.tensor(0.0, device="cuda")
two = torch.tensor(2.0, device="cuda")
input_tensor = torch.distributions.Cauchy(zero, two).sample(
(batch_size, seq_len, seq_len, dim)
).to(device='cuda', dtype=torch.float32)
else: # normal distribution
Expand Down Expand Up @@ -165,4 +167,4 @@ def generate_input(
return (input_tensor, mask, weights, config)


check_implementation = make_match_reference(ref_kernel, rtol=2e-2, atol=2e-2)
check_implementation = make_match_reference(ref_kernel, rtol=2e-2, atol=2e-2)