[Neuron] Add custom_ops for neuron backend (#13246)

Signed-off-by: Liangfu Chen <liangfc@amazon.com>
Co-authored-by: George Novack <gnovack@amazon.com>
Co-authored-by: Aoyu Zhang <aoyuzhan@amazon.com>
This commit is contained in:
Liangfu Chen
2025-02-25 11:47:49 -08:00
committed by GitHub
co-authored by George Novack Aoyu Zhang
parent 340e39e387
commit f75aa72732
9 changed files with 346 additions and 3 deletions
+4 -3
View File
@@ -345,6 +345,7 @@ def test_contexted_kv_attention(
torch.manual_seed(0)
torch.set_printoptions(sci_mode=False)
torch.set_default_device("cpu")
dtype = torch.float32
min_ctx_len = 32
@@ -438,9 +439,9 @@ def test_contexted_kv_attention(
# transform block table
active_block_table = get_active_block_tables(
block_table,
torch.tensor(query_lens),
torch.tensor(seq_lens),
block_table.cpu(),
torch.tensor(query_lens).cpu(),
torch.tensor(seq_lens).cpu(),
block_size,
num_active_blocks,
)