Commit f72b8653 authored by YdrMaster's avatar YdrMaster
Browse files

issue/314/fix: cuda compilation and test


Signed-off-by: default avatarYdrMaster <ydrml@hotmail.com>
parent f789a52f
......@@ -94,7 +94,7 @@ def rotary_embedding(ans, t, sin, cos, device):
def sin_cos_table(pos, dim, device, theta, dtype):
assert dim % 2 == 0, "Embedding dimension must be even."
freqs = 1.0 / (theta ** (torch.arange(0, dim, 2)[: (dim // 2)].float() / dim))
angles = torch.outer(pos, freqs)
angles = torch.outer(pos.cpu(), freqs)
return (
TestTensor.from_torch(torch.sin(angles), dtype, device),
TestTensor.from_torch(torch.cos(angles), dtype, device),
......
......@@ -15,8 +15,7 @@ target("infiniop-cuda")
set_policy("build.cuda.devlink", true)
set_toolchains("cuda")
add_links("cuda", "cublas")
add_linkdirs(CUDA_ROOT .. "/lib64/stubs")
add_links("cudart", "cublas")
if has_config("cudnn") then
add_links("cudnn")
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment