Unverified Commit 592c375e authored by Robert Kimball's avatar Robert Kimball Committed by GitHub

Revert "Bug fix for invalid memory access to Constant (GPU backend) (#2162)" (#2172)

This reverts commit 1c4aa225.
parent 1c4aa225
......@@ -309,7 +309,8 @@ void runtime::gpu::GPU_ExternalFunction::emit_constant_declarations()
// get an allocator for transient per kernel gpu memory
runtime::gpu::GPUAllocator allocator =
m_shared_context->m_primitive_emitter->get_memory_allocator();
size_t idx = allocator.reserve_argspace(c->get_data_ptr(), tv->size());
size_t idx = allocator.reserve_argspace(c->get_data_ptr(),
tv->size() * tv->get_element_type().size());
m_writer << "static size_t " << tv->get_name() << "_idx = " << idx << ";\n";
m_writer << "static " << tv->get_element_type().c_type_string() << "* "
<< tv->get_name() << " = nullptr;\n";
......
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