named_barrier.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /******************************************************************************
  2. * Copyright (c) 2024, Jay Shah, Ganesh Bikshandi, Ying Zhang, Vijay Thakkar, Pradeep Ramani, Tri Dao.
  3. ******************************************************************************/
  4. #pragma once
  5. #include "cutlass/arch/barrier.h"
  6. namespace flash {
  7. ////////////////////////////////////////////////////////////////////////////////////////////////////
  8. // Enumerates the reserved named barriers to avoid potential conflicts
  9. enum class FwdNamedBarriers {
  10. QueryEmpty = 0,
  11. ValueEmpty = 1,
  12. TileCountSmemEmpty = 2,
  13. TileCountSmemFull = 3,
  14. WarpSchedulerWG1 = 4,
  15. WarpSchedulerWG2 = 5,
  16. WarpSchedulerWG3 = 6,
  17. ProducerWG = 7,
  18. OutputEmpty = 8,
  19. NextWorkTile = 9
  20. };
  21. enum class BwdNamedBarriers {
  22. QueryEmpty = 0,
  23. KVEmpty = 1,
  24. TileCountSmemEmpty = 2,
  25. TileCountSmemFull = 3,
  26. // WarpSchedulerWG1 = 4,
  27. // WarpSchedulerWG2 = 5,
  28. dQEmptyWG1 = 4,
  29. dQEmptyWG2 = 5,
  30. dSFull = 6,
  31. // dSEmptyWG1 = 7,
  32. // dSEmptyWG2 = 8,
  33. dQEmpty = 7,
  34. dQFull = 8,
  35. };
  36. } // namespace flash