Skip to content

Remove backend initialization from __hipRegisterFatBinary #1087

Description

@pvelesko
extern "C" void **__hipRegisterFatBinary(const void *Data) {
  CHIP_TRY
  // Increment before calling potentially exception throwing functions.
  CHIPNumRegisteredFatBinaries++;

  logDebug("__hipRegisterFatBinary");

  // NOTE: CHIP backend initialization is undesired here. This is done
  //       for avoiding start-up lag and other unexpected issues that
  //       may come from the backend before a client makes any HIP API
  //       function call.

  // FIXME: There are segfaults that occur sometimes at program exit
  //        in some cases (e.g. in Unit_hipStreamPerThread_DeviceReset_1 test
  //        case) and they go away if we have the CHIP runtime initialized
  //        early. Should find the causes, fix them and then and then remove the
  //        CHIPInitialize() call.
  LOCK(ApiMtx);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformancePerformance optimization ideas and features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions