Browse Source

Alarm modification

tags/v0.6.0-beta
shenwei41 6 years ago
parent
commit
bda46f480f
4 changed files with 18 additions and 5 deletions
  1. +4
    -3
      mindspore/ccsrc/dataset/engine/opt/pre/removal_nodes.h
  2. +3
    -0
      mindspore/ccsrc/dataset/engine/opt/pre/removal_pass.h
  3. +5
    -2
      mindspore/ccsrc/dataset/engine/perf/connector_throughput.h
  4. +6
    -0
      mindspore/ccsrc/dataset/util/slice.h

+ 4
- 3
mindspore/ccsrc/dataset/engine/opt/pre/removal_nodes.h View File

@@ -19,12 +19,10 @@

#include <memory>
#include "dataset/engine/opt/pass.h"
#include "dataset/engine/opt/pre/removal_pass.h"

namespace mindspore {
namespace dataset {

class RemovalPass;

/// \class RemovalNodes removal_nodes.h
/// \brief This is a NodePass who's job is to identify which nodes should be removed.
/// It works in conjunction with the removal_pass.
@@ -46,6 +44,9 @@ class RemovalNodes : public NodePass {
/// \return Status The error code return
Status RunOnNode(std::shared_ptr<CacheOp> node, bool *modified) override;

/// \brief Destructor
~RemovalNodes() = default;

/// \brief Perform ShuffleOp removal check
/// \param[in] node The node being visited
/// \param[inout] modified Indicator if the node was changed at all


+ 3
- 0
mindspore/ccsrc/dataset/engine/opt/pre/removal_pass.h View File

@@ -34,6 +34,9 @@ class RemovalPass : public TreePass {
/// \brief Constructor
RemovalPass();

/// \brief Destructor
~RemovalPass() = default;

/// \brief Runs a removal_nodes pass first to find out which nodes to remove, then removes them.
/// \param[inout] tree The tree to operate on.
/// \param[inout] Indicate of the tree was modified.


+ 5
- 2
mindspore/ccsrc/dataset/engine/perf/connector_throughput.h View File

@@ -26,12 +26,11 @@
#include "dataset/engine/perf/perf_data.h"
#include "dataset/engine/perf/cyclic_array.h"
#include "dataset/engine/datasetops/dataset_op.h"
#include "dataset/engine/execution_tree.h"

using json = nlohmann::json;
namespace mindspore {
namespace dataset {
class ExecutionTree;

// Connector throughput samples the output connector size of each op in the pipeline.
// For the description of the data structure see perf_buffer.h
// It support JSON serialization for external usage.
@@ -52,6 +51,10 @@ class ConnectorThroughput : public Sampling {
timestamps_.AddSample(std::vector<TimePoint>(1));
out_buffer_count_table_.AddSample(std::vector<int64_t>(n_nodes_));
}

/// \brief Destructor
~ConnectorThroughput() = default;

// Driver function for connector size sampling.
// This function samples the connector size of every nodes within the ExecutionTree
Status Sample() override;


+ 6
- 0
mindspore/ccsrc/dataset/util/slice.h View File

@@ -31,6 +31,10 @@ class ReadableSlice {
public:
ReadableSlice() : ptr_(nullptr), sz_(0) {}
ReadableSlice(const void *ptr, size_t sz) : ptr_(ptr), sz_(sz) {}

/// \brief Destructor
~ReadableSlice() = default;

ReadableSlice(const ReadableSlice &src, off64_t offset, size_t len) {
ptr_ = static_cast<const char *>(src.GetPointer()) + offset;
sz_ = len;
@@ -89,6 +93,8 @@ class WritableSlice : public ReadableSlice {
WritableSlice(const WritableSlice &src, off64_t offset, size_t len);
WritableSlice(const WritableSlice &src, off64_t offset);
WritableSlice(const WritableSlice &lhs) : ReadableSlice(lhs) { mutable_data_ = lhs.mutable_data_; }
/// \brief Destructor
~WritableSlice() = default;
WritableSlice &operator=(const WritableSlice &lhs) {
if (this != &lhs) {
mutable_data_ = lhs.mutable_data_;


Loading…
Cancel
Save