mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 21:39:10 -04:00
minor update
This commit is contained in:
parent
e79f905d87
commit
8c5a783477
2 changed files with 2 additions and 8 deletions
|
@ -42,7 +42,7 @@ def get_vma_size(elf_file):
|
|||
min_vma = min(min_vma, vma)
|
||||
max_vma = max(max_vma, end_vma)
|
||||
vma_size = max_vma - min_vma
|
||||
#print("vma={0:x}, size={1}, min_vma={2:x}, max_vma={3:x}, vma_size={4}".format(vma, size, min_vma, max_vma, vma_size))
|
||||
#print("vma={0:x}, size={1}, min_vma=0x{2:x}, max_vma=0x{3:x}, vma_size={4}".format(vma, size, min_vma, max_vma, vma_size))
|
||||
|
||||
return min_vma, max_vma
|
||||
|
||||
|
|
|
@ -54,19 +54,13 @@ extern int vx_upload_kernel_bytes(vx_device_h hdevice, const void* content, uint
|
|||
|
||||
auto min_vma = *bytes++;
|
||||
auto max_vma = *bytes++;
|
||||
auto bin_size = size - 16;
|
||||
auto bin_size = size - 2 * 8;
|
||||
auto runtime_size = (max_vma - min_vma);
|
||||
|
||||
vx_buffer_h _hbuffer;
|
||||
#ifndef NDEBUG
|
||||
CHECK_ERR(vx_mem_reserve(hdevice, min_vma, runtime_size, 0, &_hbuffer), {
|
||||
return err;
|
||||
});
|
||||
#else
|
||||
CHECK_ERR(vx_mem_alloc(hdevice, runtime_size, 0, &_hbuffer), {
|
||||
return err;
|
||||
});
|
||||
#endif
|
||||
|
||||
// mask binary region as read-only
|
||||
CHECK_ERR(vx_mem_access(_hbuffer, 0, bin_size, VX_MEM_READ), {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue