Skip to content

Commit

Permalink
gpu: jit: ngen: prepare for proposed IGC changes
Browse files Browse the repository at this point in the history
  • Loading branch information
petercad committed Nov 2, 2022
1 parent d23cc95 commit 7144393
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gpu/jit/ngen/ngen_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,12 @@ void InterfaceHandler::generateDummyCL(std::ostream &stream) const
stream << " __asm__ volatile(\"\" :: \"rw.u\"(" << assignment.name << "));\n";
}

for (const auto &assignment : assignments) {
// Force IGC to assume surface accesses could occur if necessary.
if (assignment.exttype == ExternalArgumentType::GlobalPtr && assignment.globalSurfaceAccess())
stream << " { volatile uchar __load = ((global uchar *) " << assignment.name << ")[get_local_id(0)];}\n";
}

stream << "}\n";
}

Expand Down

0 comments on commit 7144393

Please sign in to comment.