Files
blis/addon
Balasubramanian, Vignesh 1847a1e8c6 Bugfix : Segmentation fault at the topology detection layer (#51)
- The current implementation of the topology detector establishes
      a contingency, wherein it is expected that the parallel region
      uses all the threads queried through omp_get_max_threads(). In
      case the actual parallelism in the function is limited(lower than
      this expectation), the code may access unallocated memory section
      (using uninitialized pointers).

    - This was because every thread(having it's own pointer), sets its
      initial value to NULL inside the parallel section, thereby leaving
      some pointers uninitialized if the associated thread is not spawned.

    - Also, the current implementation would use negative indexing(with -1)
      if any associated thread was not spawned.

    - Fix : Set every thread-specific pointer to NULL outside the parallel
            region, using calloc(). As long as we have NULL checks for pointers
            before accessing through them, no issues will be observed. Avoid
            incurring the topology detection cost if all the reuqired threads
            are not spawned(thereby avoiding potential negative indexing).
            (when using core-group ID).

AMD-Internal: [SWLCSG-3573]

Co-authored-by: Vignesh Balasubramanian <vignbala@amd.com>
Co-authored-by: Bhaskar, Nallani <Nallani.Bhaskar@amd.com>
2025-06-14 21:55:02 +05:30
..
2024-08-05 15:35:08 -04:00
2024-08-05 15:35:08 -04:00