changeset d5ffebd89eb2 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=d5ffebd89eb2
description:
        hsail: remove the panic guarding function directives

        HSA functions calls are still not supported properly with HSAIL, but
        the recent AMP runtime modifications rely on being able to parse the
        BRIG/HSAIL files that are extracted from the application binaries.
        We need to parse the function call HSAIL definitions, but we do not
        actually need to make the function calls.

        The reason that this happens is that HCC appends a set of routines
        to every HSAIL binary that it creates. These extra, unnecessary
        routines exist in the HCC source as a file; this file is cat'd onto
        everything that the compiler outputs before being assembled into the
        application's binary. HCC does this because it might call these helper
        functions. However, it doesn't actually appear to do so in the AMP
        codes so we just parse these functions with the HSAIL parser and
        then ignore them.

diffstat:

 src/gpu-compute/brig_object.cc |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 96c81efdd3be -r d5ffebd89eb2 src/gpu-compute/brig_object.cc
--- a/src/gpu-compute/brig_object.cc    Fri Dec 02 11:40:52 2016 -0500
+++ b/src/gpu-compute/brig_object.cc    Fri Dec 02 18:01:42 2016 -0500
@@ -176,8 +176,10 @@
                         p->firstCodeBlockEntry, p->nextModuleEntry);
 
                 if (p->firstCodeBlockEntry != p->nextModuleEntry) {
-                    panic("Function calls are not fully supported yet!!: %s\n",
-                          getString(p->name));
+                    // Function calls are not supported. We allow the BRIG
+                    // object file to create stubs, but the function calls will
+                    // not work properly if the application makes use of them.
+                    warn("HSA function invocations are unsupported.\n");
 
                     const char *name = getString(p->name);
 
@@ -199,8 +201,8 @@
                         panic("Multiple definition of Function!!: %s\n",
                               getString(p->name));
                     }
+                }
 
-                }
                 nextDirPtr = getCodeSectionEntry(p->nextModuleEntry);
             }
             break;
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to