Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
10392854
Commit
10392854
authored
Dec 17, 2019
by
Liangfu Chen
Committed by
Thierry Moreau
Dec 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix crash issue in tsim backend (#4527)
parent
093405d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
vta/src/tsim/tsim_driver.cc
+5
-7
No files found.
vta/src/tsim/tsim_driver.cc
View file @
10392854
...
@@ -188,25 +188,23 @@ TVM_REGISTER_GLOBAL("vta.tsim.profiler_status")
...
@@ -188,25 +188,23 @@ TVM_REGISTER_GLOBAL("vta.tsim.profiler_status")
}
// namespace vta
}
// namespace vta
void
*
VTAMemAlloc
(
size_t
size
,
int
cached
)
{
void
*
VTAMemAlloc
(
size_t
size
,
int
cached
)
{
void
*
addr
=
vta
::
vmem
::
VirtualMemoryManager
::
Global
()
->
Alloc
(
size
);
return
vta
::
vmem
::
VirtualMemoryManager
::
Global
()
->
Alloc
(
size
);
return
reinterpret_cast
<
void
*>
(
vta
::
vmem
::
VirtualMemoryManager
::
Global
()
->
GetPhyAddr
(
addr
));
}
}
void
VTAMemFree
(
void
*
buf
)
{
void
VTAMemFree
(
void
*
buf
)
{
void
*
addr
=
vta
::
vmem
::
VirtualMemoryManager
::
Global
()
->
GetAddr
(
reinterpret_cast
<
uint64_t
>
(
buf
));
vta
::
vmem
::
VirtualMemoryManager
::
Global
()
->
Free
(
buf
);
vta
::
vmem
::
VirtualMemoryManager
::
Global
()
->
Free
(
addr
);
}
}
vta_phy_addr_t
VTAMemGetPhyAddr
(
void
*
buf
)
{
vta_phy_addr_t
VTAMemGetPhyAddr
(
void
*
buf
)
{
return
reinterpret_cast
<
uint64_t
>
(
reinterpret_cast
<
uint64_t
*>
(
buf
)
);
return
vta
::
vmem
::
VirtualMemoryManager
::
Global
()
->
GetPhyAddr
(
buf
);
}
}
void
VTAMemCopyFromHost
(
void
*
dst
,
const
void
*
src
,
size_t
size
)
{
void
VTAMemCopyFromHost
(
void
*
dst
,
const
void
*
src
,
size_t
size
)
{
vta
::
vmem
::
VirtualMemoryManager
::
Global
()
->
MemCopyFromHost
(
dst
,
src
,
size
);
memcpy
(
dst
,
src
,
size
);
}
}
void
VTAMemCopyToHost
(
void
*
dst
,
const
void
*
src
,
size_t
size
)
{
void
VTAMemCopyToHost
(
void
*
dst
,
const
void
*
src
,
size_t
size
)
{
vta
::
vmem
::
VirtualMemoryManager
::
Global
()
->
MemCopyToHost
(
dst
,
src
,
size
);
memcpy
(
dst
,
src
,
size
);
}
}
void
VTAFlushCache
(
void
*
vir_addr
,
vta_phy_addr_t
phy_addr
,
int
size
)
{
void
VTAFlushCache
(
void
*
vir_addr
,
vta_phy_addr_t
phy_addr
,
int
size
)
{
...
...
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