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
180674dc
Unverified
Commit
180674dc
authored
Jan 12, 2026
by
PanZezhong1725
Committed by
GitHub
Jan 12, 2026
Browse files
Merge pull request #918 from InfiniTensor/issue/867
issue/867 fix cpu malloc
parents
422a4e1e
ef867cc8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
9 deletions
+6
-9
src/infinicore/context/context_impl.cc
src/infinicore/context/context_impl.cc
+1
-0
src/infiniop/ops/rearrange/nvidia/rearrange_nvidia.cu
src/infiniop/ops/rearrange/nvidia/rearrange_nvidia.cu
+4
-6
xmake/test.lua
xmake/test.lua
+1
-3
No files found.
src/infinicore/context/context_impl.cc
View file @
180674dc
...
...
@@ -126,6 +126,7 @@ std::shared_ptr<Memory> allocateMemory(size_t size) {
}
std
::
shared_ptr
<
Memory
>
allocateHostMemory
(
size_t
size
)
{
setDevice
(
Device
::
cpu
());
return
ContextImpl
::
singleton
().
getCpuRuntime
()
->
allocateMemory
(
size
);
}
...
...
src/infiniop/ops/rearrange/nvidia/rearrange_nvidia.cu
View file @
180674dc
...
...
@@ -345,12 +345,10 @@ infiniStatus_t launchKernel(
const_cast
<
void
*>
(
static_cast
<
const
void
*>
(
params
.
dst_grid_stride
.
data
())),
const_cast
<
void
*>
(
static_cast
<
const
void
*>
(
constraints_data
))};
CHECK_OR_RETURN
(
cudaLaunchKernel
(
kernel_func
,
static_cast
<
unsigned
int
>
(
grid_size
),
static_cast
<
unsigned
int
>
(
BLOCK_SIZE
),
args
,
0
,
stream
)
==
cudaSuccess
,
INFINI_STATUS_INTERNAL_ERROR
);
CHECK_CUDA
(
cudaLaunchKernel
(
kernel_func
,
static_cast
<
unsigned
int
>
(
grid_size
),
static_cast
<
unsigned
int
>
(
BLOCK_SIZE
),
args
,
0
,
stream
));
return
INFINI_STATUS_SUCCESS
;
}
...
...
xmake/test.lua
View file @
180674dc
...
...
@@ -88,8 +88,6 @@ target("infinicore-test")
add_files
(
os
.
projectdir
()
..
"/src/infinicore/ops/*/*.cc"
)
add_files
(
os
.
projectdir
()
..
"/src/infinicore/nn/*.cc"
)
add_files
(
os
.
projectdir
()
..
"/src/infinicore-test/*.cc"
)
add_files
(
os
.
projectdir
()
..
"/src/infinicore-test/*/*.cc"
)
add_files
(
os
.
projectdir
()
..
"/src/infinicore-test/**.cc"
)
set_installdir
(
INFINI_ROOT
)
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