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
dcdaf26e
Commit
dcdaf26e
authored
Jul 26, 2018
by
Chris Sullivan
Committed by
Robert Kimball
Jul 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix launch parameter bug for broadcast and pad. (#1261)
* Broadcast and Pad bug fix.
parent
d4349db8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
cuda_emitter.cpp
src/ngraph/runtime/gpu/cuda_emitter.cpp
+5
-4
No files found.
src/ngraph/runtime/gpu/cuda_emitter.cpp
View file @
dcdaf26e
...
...
@@ -98,10 +98,11 @@ size_t runtime::gpu::CUDAEmitter::build_pad(const std::array<std::string, 2>& dt
return
primitive_index
;
}
uint32_t
nthreads
=
static_cast
<
uint32_t
>
(
shape_size
(
output_shape
)
);
size_t
nthreads
=
shape_size
(
output_shape
);
//TODO: currently we set it to 64, will add tuning method later
uint32_t
block_size_x
=
64
;
uint32_t
aligned_grid_size_x
=
align_to_block_size
(
nthreads
,
block_size_x
);
uint32_t
aligned_grid_size_x
=
align_to_block_size
(
static_cast
<
uint32_t
>
(
nthreads
),
block_size_x
);
// if the kernel has not been compiled, build it
auto
compiled_kernel
=
m_ctx
->
compiled_kernel_pool
->
get
(
hash
);
...
...
@@ -1372,11 +1373,11 @@ size_t runtime::gpu::CUDAEmitter::build_broadcast(const std::array<std::string,
float
alpha
=
1.0
f
;
float
beta
=
0.0
f
;
int
nthreads
=
static_cast
<
int
>
(
shape_size
(
result_shape
)
);
size_t
nthreads
=
shape_size
(
result_shape
);
//TODO: currently we set it to 64, will add tuning method later
uint32_t
block_size_x
=
64
;
uint32_t
aligned_grid_size_x
=
align_to_block_size
(
static_cast
<
uint32_t
>
(
shape_size
(
result_shape
)
),
block_size_x
);
align_to_block_size
(
static_cast
<
uint32_t
>
(
nthreads
),
block_size_x
);
std
::
unique_ptr
<
gpu
::
primitive
>
broadcast
(
new
gpu
::
primitive
{[
=
](
void
**
inputs
,
void
**
outputs
)
mutable
{
...
...
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