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
e58e67a3
Commit
e58e67a3
authored
Mar 13, 2025
by
qinyiqun
Browse files
issue/87/fix: add rt compile target
parent
5450c707
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
1 deletion
+17
-1
src/infiniop/devices/musa/musa_handle.cc
src/infiniop/devices/musa/musa_handle.cc
+2
-0
src/infiniop/devices/musa/musa_handle.h
src/infiniop/devices/musa/musa_handle.h
+1
-0
src/infinirt/musa/infinirt_musa.cc
src/infinirt/musa/infinirt_musa.cc
+1
-1
xmake.lua
xmake.lua
+3
-0
xmake/musa.lua
xmake/musa.lua
+10
-0
No files found.
src/infiniop/devices/musa/musa_handle.cc
View file @
e58e67a3
...
...
@@ -5,6 +5,8 @@ Handle::Handle(infiniDevice_t device, int device_id)
:
InfiniopHandle
{
device
,
device_id
},
_internal
(
std
::
make_shared
<
Handle
::
Internal
>
())
{}
Handle
::
Handle
(
int
device_id
)
:
Handle
(
INFINI_DEVICE_MOORE
,
device_id
)
{}
auto
Handle
::
internal
()
const
->
const
std
::
shared_ptr
<
Internal
>
&
{
return
_internal
;
}
...
...
src/infiniop/devices/musa/musa_handle.h
View file @
e58e67a3
...
...
@@ -6,6 +6,7 @@
namespace
device
::
musa
{
struct
Handle
:
public
InfiniopHandle
{
Handle
(
int
device_id
);
class
Internal
;
auto
internal
()
const
->
const
std
::
shared_ptr
<
Internal
>
&
;
...
...
src/infinirt/musa/infinirt_musa.cc
View file @
e58e67a3
...
...
@@ -122,7 +122,7 @@ infiniStatus_t memcpyAsync(void *dst, const void *src, size_t size, infinirtMemc
}
infiniStatus_t
mallocAsync
(
void
**
p_ptr
,
size_t
size
,
infinirtStream_t
stream
)
{
return
mallocDevice
(
p_ptr
,
size
,
stream
);
return
mallocDevice
(
p_ptr
,
size
);
}
infiniStatus_t
freeAsync
(
void
*
ptr
,
infinirtStream_t
stream
)
{
...
...
xmake.lua
View file @
e58e67a3
...
...
@@ -140,6 +140,9 @@ target("infinirt")
if
has_config
(
"metax-gpu"
)
then
add_deps
(
"infinirt-metax"
)
end
if
has_config
(
"moore-gpu"
)
then
add_deps
(
"infinirt-moore"
)
end
if
has_config
(
"kunlun-xpu"
)
then
add_deps
(
"infinirt-kunlun"
)
end
...
...
xmake/musa.lua
View file @
e58e67a3
...
...
@@ -39,3 +39,13 @@ target("infiniop-moore")
add_files
(
"../src/infiniop/ops/*/musa/*.mu"
,
{
rule
=
"mu"
})
add_cxflags
(
"-lstdc++ -Wall -fPIC"
)
target_end
()
target
(
"infinirt-moore"
)
set_kind
(
"static"
)
set_languages
(
"cxx17"
)
on_install
(
function
(
target
)
end
)
add_deps
(
"infini-utils"
)
-- Add files
add_files
(
"$(projectdir)/src/infinirt/musa/*.cc"
)
add_cxflags
(
"-lstdc++ -Wall -Werror -fPIC"
)
target_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