summaryrefslogtreecommitdiff
path: root/libhsail-rt
diff options
context:
space:
mode:
authorPekka Jääskeläinen <visit0r@gcc.gnu.org>2017-09-25 17:17:29 +0000
committerPekka Jääskeläinen <visit0r@gcc.gnu.org>2017-09-25 17:17:29 +0000
commitc02bffe38a706d8251442cf01095563c1bdcd61f (patch)
tree890083ba57439197b76327702f4b9099ed466e94 /libhsail-rt
parent15e23330102f2c2a0815c70cf0ffca18fcdfdc40 (diff)
downloadgcc-c02bffe38a706d8251442cf01095563c1bdcd61f.tar.gz
BRIGFE fixes:
* brig-builtins.def: Treat HSAIL barrier builtins as setjmp/longjump style functions. * brigfrontend/brig-to-generic.cc: Ensure per WI copies of private variables are aligned too. * rt/workitems.c: Assume the host runtime allocates the work group memory. From-SVN: r253160
Diffstat (limited to 'libhsail-rt')
-rw-r--r--libhsail-rt/ChangeLog4
-rw-r--r--libhsail-rt/rt/workitems.c23
2 files changed, 4 insertions, 23 deletions
diff --git a/libhsail-rt/ChangeLog b/libhsail-rt/ChangeLog
index 31ffff694c7..bf86278584d 100644
--- a/libhsail-rt/ChangeLog
+++ b/libhsail-rt/ChangeLog
@@ -1,3 +1,7 @@
+2017-09-25 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
+
+ * rt/workitems.c: Assume the host runtime allocates the work group
+ memory.
2017-05-03 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
* rt/workitems.c: Removed a leftover comment.
diff --git a/libhsail-rt/rt/workitems.c b/libhsail-rt/rt/workitems.c
index e2c2373757a..ed1185a5780 100644
--- a/libhsail-rt/rt/workitems.c
+++ b/libhsail-rt/rt/workitems.c
@@ -318,14 +318,6 @@ phsa_spawn_work_items (PHSAKernelLaunchData *context, void *group_base_ptr)
hsa_kernel_dispatch_packet_t *dp = context->dp;
size_t x, y, z;
- /* TO DO: host-side memory management of group and private segment
- memory. Agents in general are less likely to support efficient dynamic mem
- allocation. */
- if (dp->group_segment_size > 0
- && posix_memalign (&group_base_ptr, PRIVATE_SEGMENT_ALIGN,
- dp->group_segment_size) != 0)
- phsa_fatal_error (3);
-
context->group_segment_start_addr = (size_t) group_base_ptr;
/* HSA seems to allow the WG size to be larger than the grid size. We need to
@@ -371,9 +363,6 @@ phsa_spawn_work_items (PHSAKernelLaunchData *context, void *group_base_ptr)
phsa_execute_wi_gang (context, group_base_ptr, sat_wg_size_x, sat_wg_size_y,
sat_wg_size_z);
-
- if (dp->group_segment_size > 0)
- free (group_base_ptr);
}
#endif
@@ -390,14 +379,6 @@ phsa_execute_work_groups (PHSAKernelLaunchData *context, void *group_base_ptr)
hsa_kernel_dispatch_packet_t *dp = context->dp;
size_t x, y, z, wg_x, wg_y, wg_z;
- /* TODO: host-side memory management of group and private segment
- memory. Agents in general are less likely to support efficient dynamic mem
- allocation. */
- if (dp->group_segment_size > 0
- && posix_memalign (&group_base_ptr, GROUP_SEGMENT_ALIGN,
- dp->group_segment_size) != 0)
- phsa_fatal_error (3);
-
context->group_segment_start_addr = (size_t) group_base_ptr;
/* HSA seems to allow the WG size to be larger than the grid size. We need
@@ -509,10 +490,6 @@ phsa_execute_work_groups (PHSAKernelLaunchData *context, void *group_base_ptr)
printf ("### %lu WIs executed in %lu s (%lu WIs / s)\n", wi_total,
(uint64_t) spent_time_sec, (uint64_t) wis_per_sec);
#endif
-
- if (dp->group_segment_size > 0)
- free (group_base_ptr);
-
free (private_base_ptr);
private_base_ptr = NULL;
}