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
f8173f07
Commit
f8173f07
authored
Mar 13, 2025
by
qinyiqun
Browse files
issue/87/fix: add metax-rt compile target
parent
fd58c99c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
1 deletion
+16
-1
src/infiniop/devices/maca/maca_handle.cc
src/infiniop/devices/maca/maca_handle.cc
+2
-0
src/infiniop/devices/maca/maca_handle.h
src/infiniop/devices/maca/maca_handle.h
+1
-0
src/infiniop/ops/matmul/maca/matmul_maca.cc
src/infiniop/ops/matmul/maca/matmul_maca.cc
+0
-1
xmake.lua
xmake.lua
+3
-0
xmake/maca.lua
xmake/maca.lua
+10
-0
No files found.
src/infiniop/devices/maca/maca_handle.cc
View file @
f8173f07
...
...
@@ -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_METAX
,
device_id
)
{}
auto
Handle
::
internal
()
const
->
const
std
::
shared_ptr
<
Internal
>
&
{
return
_internal
;
}
...
...
src/infiniop/devices/maca/maca_handle.h
View file @
f8173f07
...
...
@@ -6,6 +6,7 @@
namespace
device
::
maca
{
struct
Handle
:
public
InfiniopHandle
{
Handle
(
int
device_id
);
class
Internal
;
auto
internal
()
const
->
const
std
::
shared_ptr
<
Internal
>
&
;
...
...
src/infiniop/ops/matmul/maca/matmul_maca.cc
View file @
f8173f07
...
...
@@ -60,7 +60,6 @@ infiniStatus_t Descriptor::calculate(
case
INFINI_DTYPE_F32
:
a_type
=
b_type
=
c_type
=
HPCC_R_32F
;
compute_type
=
HCBLAS_COMPUTE_32F_FAST_TF32
;
#endif
break
;
default:
...
...
xmake.lua
View file @
f8173f07
...
...
@@ -132,6 +132,9 @@ target("infinirt")
if
has_config
(
"ascend-npu"
)
then
add_deps
(
"infinirt-ascend"
)
end
if
has_config
(
"metax-gpu"
)
then
add_deps
(
"infinirt-metax"
)
end
set_languages
(
"cxx17"
)
set_installdir
(
os.getenv
(
"INFINI_ROOT"
)
or
(
os.getenv
(
is_host
(
"windows"
)
and
"HOMEPATH"
or
"HOME"
)
..
"/.infini"
))
add_files
(
"src/infinirt/*.cc"
)
...
...
xmake/maca.lua
View file @
f8173f07
...
...
@@ -42,3 +42,13 @@ target("infiniop-metax")
add_files
(
"../src/infiniop/ops/*/maca/*.maca"
,
{
rule
=
"maca"
})
target_end
()
target
(
"infinirt-metax"
)
set_kind
(
"static"
)
set_languages
(
"cxx17"
)
on_install
(
function
(
target
)
end
)
add_deps
(
"infini-utils"
)
-- Add files
add_files
(
"$(projectdir)/src/infinirt/maca/*.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