1
0

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. };
  19. enum class BwdNamedBarriers {
  20. Epilogue = 0,
  21. KVEmpty = 1,
  22. // This needs to match FwdNamedBarriers::TileCountSmemEmpty since TileScheduler uses it
  23. TileCountSmemEmpty = 2,
  24. TileCountSmemFull = 3,
  25. PdS = 4,
  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. } // flash