Commit 6cdd0c9c authored by Paul's avatar Paul
Browse files

Fix memory access error in launch

parent 89f6abf3
...@@ -21,7 +21,7 @@ __global__ void launcher(F f) ...@@ -21,7 +21,7 @@ __global__ void launcher(F f)
auto launch(std::size_t global, std::size_t local) auto launch(std::size_t global, std::size_t local)
{ {
return [&](auto f) { return [=](auto f) {
assert(local > 0); assert(local > 0);
assert(global > 0); assert(global > 0);
using f_type = decltype(f); using f_type = decltype(f);
...@@ -107,22 +107,6 @@ struct hip_tensor_descriptor ...@@ -107,22 +107,6 @@ struct hip_tensor_descriptor
size_t strides[NDim] = {}; size_t strides[NDim] = {};
}; };
// template <typename T, size_t NDim>
// __global__ void contiguous_gpu(const T* a,
// hip_tensor_descriptor<NDim> a_desc,
// T* at,
// hip_tensor_descriptor<NDim> at_desc,
// size_t nelements)
// {
// for(size_t i = blockIdx.x * blockDim.x + threadIdx.x; i < nelements;
// i += blockDim.x * gridDim.x)
// {
// hip_index<NDim> s = at_desc.multi(i);
// size_t lidx = a_desc.linear(s);
// at[i] = a[lidx];
// }
// }
void hip_contiguous(migraph::shape output_shape, migraph::argument arg, migraph::argument result) void hip_contiguous(migraph::shape output_shape, migraph::argument arg, migraph::argument result)
{ {
visit_all(result, arg)([&](auto output, auto input) { visit_all(result, arg)([&](auto output, auto input) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment