dummyOp.hpp 791 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef DUMMY_OP_FPGA_H
  2. #define DUMMY_OP_FPGA_H
  3. #include "tensorflow/core/framework/op_kernel.h"
  4. #include "tensorflow/core/framework/function.h"
  5. #include <stdlib.h>
  6. #include <iostream>
  7. #include <string>
  8. #include <chrono>
  9. #include <thread>
  10. #include <future>
  11. #include <mutex>
  12. #include <condition_variable>
  13. #include "../lib/mlfpga/include/connectionManager.hpp"
  14. #include "../lib/mlfpga/include/modules.hpp"
  15. #include "entrypoint.hpp"
  16. namespace tf_lib {
  17. using namespace tensorflow;
  18. using namespace std::chrono;
  19. class DummyOp : public AsyncOpKernel {
  20. public:
  21. explicit DummyOp(OpKernelConstruction* context);
  22. void ComputeAsync(OpKernelContext* context, DoneCallback done) override;
  23. private:
  24. const int dataLength = 4;
  25. int tagCounter = 0;
  26. };
  27. }
  28. #endif