Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpvm-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
hpvm-release
Commits
91d9cd17
Commit
91d9cd17
authored
3 years ago
by
Hashim Sharif
Browse files
Options
Downloads
Plain Diff
Merging in FIX for hpvm-clang (-O3 usage)
parents
11068a0e
b2231780
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hpvm/test/benchmarks/hpvm-cava/src/main.c
+13
-6
13 additions, 6 deletions
hpvm/test/benchmarks/hpvm-cava/src/main.c
hpvm/tools/hpvm-clang/main.py.in
+2
-2
2 additions, 2 deletions
hpvm/tools/hpvm-clang/main.py.in
with
15 additions
and
8 deletions
hpvm/test/benchmarks/hpvm-cava/src/main.c
+
13
−
6
View file @
91d9cd17
...
@@ -12,6 +12,9 @@
...
@@ -12,6 +12,9 @@
#include
"hpvm.h"
#include
"hpvm.h"
// Max file extension size
#define MAX_EXT_SIZE 20
int
NUM_TEST_CASES
;
int
NUM_TEST_CASES
;
int
NUM_CLASSES
;
int
NUM_CLASSES
;
int
INPUT_DIM
;
int
INPUT_DIM
;
...
@@ -875,29 +878,33 @@ int main(int argc, char *argv[]) {
...
@@ -875,29 +878,33 @@ int main(int argc, char *argv[]) {
// Output the image.
// Output the image.
// NOTE: We deliberately perform this file I/O outside of the kernel.
// NOTE: We deliberately perform this file I/O outside of the kernel.
char
str
[
50
],
base_str
[
50
];
const
int
len
=
strlen
(
args
.
args
[
OUTPUT_IMAGE_BIN
]);
const
char
*
base_str
=
args
.
args
[
OUTPUT_IMAGE_BIN
];
char
*
str
=
malloc
(
sizeof
(
char
)
*
(
len
+
MAX_EXT_SIZE
+
1
));
// Handles the extensions below
strcpy
(
base_str
,
args
.
args
[
OUTPUT_IMAGE_BIN
]);
strcpy
(
base_str
,
args
.
args
[
OUTPUT_IMAGE_BIN
]);
strcpy
(
str
,
base_str
);
strcpy
(
str
,
base_str
);
strcat
(
str
,
".bin"
);
str
n
cat
(
str
,
".bin"
,
MAX_EXT_SIZE
);
printf
(
"Writing output image to %s
\n
"
,
str
);
printf
(
"Writing output image to %s
\n
"
,
str
);
write_image_to_binary
(
str
,
image_out
,
row_size
,
col_size
);
write_image_to_binary
(
str
,
image_out
,
row_size
,
col_size
);
strcpy
(
str
,
base_str
);
strcpy
(
str
,
base_str
);
strcat
(
str
,
"_gamut.bin"
);
str
n
cat
(
str
,
"_gamut.bin"
,
MAX_EXT_SIZE
);
printf
(
"Writing output image to %s
\n
"
,
str
);
printf
(
"Writing output image to %s
\n
"
,
str
);
write_image_to_binary
(
str
,
image_out_gamut
,
row_size
,
col_size
);
write_image_to_binary
(
str
,
image_out_gamut
,
row_size
,
col_size
);
strcpy
(
str
,
base_str
);
strcpy
(
str
,
base_str
);
strcat
(
str
,
"_demosaic.bin"
);
str
n
cat
(
str
,
"_demosaic.bin"
,
MAX_EXT_SIZE
);
printf
(
"Writing output image to %s
\n
"
,
str
);
printf
(
"Writing output image to %s
\n
"
,
str
);
write_image_to_binary
(
str
,
image_out_demosaic
,
row_size
,
col_size
);
write_image_to_binary
(
str
,
image_out_demosaic
,
row_size
,
col_size
);
strcpy
(
str
,
base_str
);
strcpy
(
str
,
base_str
);
strcat
(
str
,
"_denoise.bin"
);
str
n
cat
(
str
,
"_denoise.bin"
,
MAX_EXT_SIZE
);
printf
(
"Writing output image to %s
\n
"
,
str
);
printf
(
"Writing output image to %s
\n
"
,
str
);
write_image_to_binary
(
str
,
image_out_denoise
,
row_size
,
col_size
);
write_image_to_binary
(
str
,
image_out_denoise
,
row_size
,
col_size
);
strcpy
(
str
,
base_str
);
strcpy
(
str
,
base_str
);
strcat
(
str
,
"_transform.bin"
);
str
n
cat
(
str
,
"_transform.bin"
,
MAX_EXT_SIZE
);
printf
(
"Writing output image to %s
\n
"
,
str
);
printf
(
"Writing output image to %s
\n
"
,
str
);
write_image_to_binary
(
str
,
image_out_transform
,
row_size
,
col_size
);
write_image_to_binary
(
str
,
image_out_transform
,
row_size
,
col_size
);
free
(
str
);
__hpvm__cleanup
();
__hpvm__cleanup
();
return
0
;
return
0
;
...
...
This diff is collapsed.
Click to expand it.
hpvm/tools/hpvm-clang/main.py.in
+
2
−
2
View file @
91d9cd17
...
@@ -229,8 +229,8 @@ See option -b for that."""
...
@@ -229,8 +229,8 @@ See option -b for that."""
help
=
"
[clang emit-llvm] clang++ flags (such as -ffastmath)
"
help
=
"
[clang emit-llvm] clang++ flags (such as -ffastmath)
"
)
)
parser
.
add_argument
(
parser
.
add_argument
(
"
-O
"
,
type
=
str
,
default
=
"
0
"
,
metavar
=
"
level
"
,
"
-O
"
,
type
=
str
,
default
=
"
1
"
,
metavar
=
"
level
"
,
help
=
"
[clang emit-llvm] Optimization level
"
help
=
"
[clang emit-llvm] Optimization level
. Note that default is -O1.
"
)
)
parser
.
add_argument
(
parser
.
add_argument
(
"
--std
"
,
type
=
str
,
"
--std
"
,
type
=
str
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment