Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
infinicore
Commits
f72b8653
Commit
f72b8653
authored
Jul 10, 2025
by
YdrMaster
Browse files
issue/314/fix: cuda compilation and test
Signed-off-by:
YdrMaster
<
ydrml@hotmail.com
>
parent
f789a52f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
test/infiniop/rope.py
test/infiniop/rope.py
+1
-1
xmake/cuda.lua
xmake/cuda.lua
+1
-2
No files found.
test/infiniop/rope.py
View file @
f72b8653
...
@@ -94,7 +94,7 @@ def rotary_embedding(ans, t, sin, cos, device):
...
@@ -94,7 +94,7 @@ def rotary_embedding(ans, t, sin, cos, device):
def
sin_cos_table
(
pos
,
dim
,
device
,
theta
,
dtype
):
def
sin_cos_table
(
pos
,
dim
,
device
,
theta
,
dtype
):
assert
dim
%
2
==
0
,
"Embedding dimension must be even."
assert
dim
%
2
==
0
,
"Embedding dimension must be even."
freqs
=
1.0
/
(
theta
**
(
torch
.
arange
(
0
,
dim
,
2
)[:
(
dim
//
2
)].
float
()
/
dim
))
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
(
return
(
TestTensor
.
from_torch
(
torch
.
sin
(
angles
),
dtype
,
device
),
TestTensor
.
from_torch
(
torch
.
sin
(
angles
),
dtype
,
device
),
TestTensor
.
from_torch
(
torch
.
cos
(
angles
),
dtype
,
device
),
TestTensor
.
from_torch
(
torch
.
cos
(
angles
),
dtype
,
device
),
...
...
xmake/cuda.lua
View file @
f72b8653
...
@@ -15,8 +15,7 @@ target("infiniop-cuda")
...
@@ -15,8 +15,7 @@ target("infiniop-cuda")
set_policy
(
"build.cuda.devlink"
,
true
)
set_policy
(
"build.cuda.devlink"
,
true
)
set_toolchains
(
"cuda"
)
set_toolchains
(
"cuda"
)
add_links
(
"cuda"
,
"cublas"
)
add_links
(
"cudart"
,
"cublas"
)
add_linkdirs
(
CUDA_ROOT
..
"/lib64/stubs"
)
if
has_config
(
"cudnn"
)
then
if
has_config
(
"cudnn"
)
then
add_links
(
"cudnn"
)
add_links
(
"cudnn"
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment