dummyOp.hpp 868 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. void fpgaCall(const Tensor *input, Tensor *output, DoneCallback done);
  25. const int dataLength = 4;
  26. int tagCounter = 0;
  27. };
  28. }
  29. #endif