fix: restore CPU flash_attn test to use sgl_kernel directly (#22573)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
f2af00d05a
commit
3c46ff2ac5
@@ -1,12 +1,14 @@
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
import sgl_kernel # noqa: F401
|
||||||
import torch
|
import torch
|
||||||
import torch.nn.functional as F
|
import torch.nn.functional as F
|
||||||
from utils import parametrize, precision
|
from utils import parametrize, precision
|
||||||
|
|
||||||
from sglang.jit_kernel.flash_attention import flash_attn_varlen_func
|
|
||||||
from sglang.test.test_utils import CustomTestCase
|
from sglang.test.test_utils import CustomTestCase
|
||||||
|
|
||||||
|
flash_attn_varlen_func = torch.ops.sgl_kernel.flash_attn_varlen_func
|
||||||
|
|
||||||
torch.manual_seed(1234)
|
torch.manual_seed(1234)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user