named_barrier.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. ProducerWG = 1,
  12. TileCountSmemEmpty = 2,
  13. TileCountSmemFull = 3,
  14. WarpSchedulerWG1 = 4,
  15. WarpSchedulerWG2 = 5,
  16. WarpSchedulerWG3 = 6,
  17. AppendKV = 7,
  18. QueryRotated = 8,
  19. };
  20. enum class BwdNamedBarriers {
  21. KVEmpty = 0,
  22. PdS = 1,
  23. // This needs to match FwdNamedBarriers::TileCountSmemEmpty since TileScheduler uses it
  24. TileCountSmemEmpty = 2,
  25. TileCountSmemFull = 3,
  26. dQEmptyWG1 = 4,
  27. dQEmptyWG2 = 5,
  28. dQEmptyWG3 = 6,
  29. dQFullWG1 = 7,
  30. dQFullWG2 = 8,
  31. dQFullWG3 = 9,
  32. };
  33. } // flash