Skip to content

Commit

Permalink
skip randomly
Browse files Browse the repository at this point in the history
  • Loading branch information
micmelesse committed Sep 3, 2024
1 parent 8110e1d commit 5cc4d06
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_flash_attn.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import math
import random

import pytest
import torch
Expand All @@ -20,9 +21,12 @@
def is_power_of_2(n):
return n > 0 and (n & (n - 1)) == 0

random.seed(42)

def skip_config(**kwargs):
if 'd' in kwargs:
return not is_power_of_2(kwargs['d'])
# return not is_power_of_2(kwargs['d'])
return random.random() < 0.20
return False

def is_hip():
Expand Down

0 comments on commit 5cc4d06

Please sign in to comment.