Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
1e7382c7
Commit
1e7382c7
authored
Nov 14, 2017
by
Jaikrishnan Menon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPU: Remove codegen directory if it exists
parent
abdbe348
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
file_util.cpp
src/ngraph/file_util.cpp
+6
-0
external_function.cpp
src/ngraph/runtime/cpu/external_function.cpp
+1
-0
No files found.
src/ngraph/file_util.cpp
View file @
1e7382c7
...
@@ -78,6 +78,12 @@ size_t ngraph::file_util::get_file_size(const string& filename)
...
@@ -78,6 +78,12 @@ size_t ngraph::file_util::get_file_size(const string& filename)
void
ngraph
::
file_util
::
remove_directory
(
const
string
&
dir
)
void
ngraph
::
file_util
::
remove_directory
(
const
string
&
dir
)
{
{
struct
stat
status
;
if
(
stat
(
dir
.
c_str
(),
&
status
)
==
-
1
)
{
return
;
}
file_util
::
iterate_files
(
dir
,
file_util
::
iterate_files
(
dir
,
[](
const
string
&
file
,
bool
is_dir
)
{
[](
const
string
&
file
,
bool
is_dir
)
{
if
(
is_dir
)
if
(
is_dir
)
...
...
src/ngraph/runtime/cpu/external_function.cpp
View file @
1e7382c7
...
@@ -328,6 +328,7 @@ extern "C" void free_aligned_buffer(void* allocated);
...
@@ -328,6 +328,7 @@ extern "C" void free_aligned_buffer(void* allocated);
string
output_dir
=
"cpu_codegen"
;
string
output_dir
=
"cpu_codegen"
;
string
function_name
=
m_function
->
get_name
();
string
function_name
=
m_function
->
get_name
();
file_util
::
remove_directory
(
output_dir
);
file_util
::
make_directory
(
output_dir
);
file_util
::
make_directory
(
output_dir
);
string
filename
=
file_util
::
path_join
(
output_dir
,
function_name
+
"_codegen.cpp"
);
string
filename
=
file_util
::
path_join
(
output_dir
,
function_name
+
"_codegen.cpp"
);
ofstream
out
(
filename
);
ofstream
out
(
filename
);
...
...
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