Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for write_impl (0.17 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.cc

    struct LogInfoRawStream : public llvm::raw_ostream {
      LogInfoRawStream() { SetUnbuffered(); }
      ~LogInfoRawStream() override = default;
      uint64_t current_pos() const override { return 0; }
    
      void write_impl(const char* ptr, size_t size) override {
        fprintf(stderr, "%.*s", static_cast<int>(size), ptr);
      }
    };
    
    // Simple raw_ostream that prints to a file.
    struct WritableFileRawStream : public llvm::raw_ostream {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jan 05 03:03:46 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/dump_graph.cc

      explicit WritableFileRawStream(WritableFile* file) : file(file) {
        SetUnbuffered();
      }
      ~WritableFileRawStream() override = default;
      uint64_t current_pos() const override { return 0; }
    
      void write_impl(const char* ptr, size_t size) override {
        // If an error is encountered, null out the file.
        if (file) {
          Status s = file->Append(StringPiece(ptr, size));
          if (!s.ok()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 03:47:51 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/internal/mlir_pass_instrumentation_test.cc

    struct StringStream : public llvm::raw_ostream {
      StringStream() { SetUnbuffered(); }
      ~StringStream() override = default;
      uint64_t current_pos() const override { return 0; }
    
      void write_impl(const char* ptr, size_t size) override {
        ss.write(ptr, size);
      }
      std::stringstream ss;
    };
    
    class TestPassInstrumentation : public ::testing::Test {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Sep 19 22:54:26 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/debugging/mlir_dump.cc

      }
    
      uint64_t current_pos() const override {
        int64_t position;
        if (file_->Tell(&position).ok()) {
          return position;
        } else {
          return -1;
        }
      }
    
      void write_impl(const char* ptr, size_t size) override {
        if (file_ && !file_->Append(tsl::StringPiece(ptr, size)).ok()) {
          file_ = nullptr;
        }
      }
    
      std::unique_ptr<tsl::WritableFile> file_;
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 05:38:57 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/debug/debug.cc

          // a subroutine or not, so it's important we have a working current_pos().
          LOG(WARNING)
              << "Couldn't query file position. Stream might be malformed.\n";
          return -1;
        }
      }
    
      void write_impl(const char* ptr, size_t size) override {
        // Write the file if it is still valid. If the write fails, null out the
        // file to avoid encountering another error.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jan 10 02:44:52 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  6. pkg/test/util/yml/file.go

    }
    
    type writerImpl struct {
    	workDir string
    }
    
    // NewFileWriter creates a new FileWriter that stores files under workDir.
    func NewFileWriter(workDir string) FileWriter {
    	return &writerImpl{
    		workDir: workDir,
    	}
    }
    
    // WriteYAML writes the given YAML content to one or more YAML files.
    func (w *writerImpl) WriteYAML(filenamePrefix string, contents ...string) ([]string, error) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Sep 07 14:33:54 UTC 2023
    - 4.2K bytes
    - Viewed (0)
Back to top