Unverified Commit 37fca35c authored by Robert Kimball's avatar Robert Kimball Committed by GitHub

remove obsolete classes (#867)

* remove obsolete classes
parent 392eeb3f
/*******************************************************************************
* Copyright 2017-2018 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
#pragma once
#include <cstddef>
namespace ngraph
{
namespace descriptor
{
// A buffer identfies a chunk of storage
// In descriptors, we are identifying what will be associated with actual memory
// during execution.
class Buffer
{
public:
size_t size() const { return m_size; }
protected:
size_t m_size;
};
}
}
/*******************************************************************************
* Copyright 2017-2018 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
#pragma once
#include <cassert>
#include <memory>
#include "ngraph/descriptor/buffer.hpp"
namespace ngraph
{
namespace descriptor
{
/// @brief Specifies a contiguous portion of a buffer.
///
/// Currently only implemented for linear buffers.
class BufferPos
{
public:
BufferPos() {}
BufferPos(std::shared_ptr<Buffer> buffer, size_t offset, size_t size)
: m_buffer(buffer)
, m_offset(offset)
, m_size(size)
{
assert(buffer->size() >= offset + size);
}
BufferPos(const BufferPos& buffer_pos) = default;
BufferPos& operator=(const BufferPos& buffer_pos) = default;
protected:
std::shared_ptr<Buffer> m_buffer;
size_t m_offset;
size_t m_size;
};
}
}
......@@ -19,7 +19,6 @@
#include <memory>
#include <vector>
#include "ngraph/descriptor/buffer_pos.hpp"
#include "ngraph/descriptor/tensor_view.hpp"
namespace ngraph
......@@ -58,15 +57,11 @@ namespace ngraph
const element::Type& get_element_type() const;
const Shape& get_shape() const;
virtual const Strides& get_strides() const = 0;
/// Where this view is located in the buffer.
const BufferPos& get_buffer_pos() const { return m_buffer_pos; }
BufferPos& get_buffer_pos() { return m_buffer_pos; }
/// @brief Return true if this and other have the same element interpretation
virtual bool operator==(const TensorViewLayout& other) const = 0;
bool operator!=(const TensorViewLayout& other) const { return !(*this == other); }
protected:
std::shared_ptr<const TensorViewType> m_tensor_view_type;
BufferPos m_buffer_pos;
};
}
}
......
......@@ -48,7 +48,6 @@
#include "ngraph/builder/reduce_ops.hpp"
#include "ngraph/builder/tensor_mask.hpp"
#include "ngraph/coordinate_transform.hpp"
#include "ngraph/descriptor/buffer.hpp"
#include "ngraph/descriptor/input.hpp"
#include "ngraph/descriptor/layout/dense_tensor_view_layout.hpp"
#include "ngraph/descriptor/layout/tensor_view_layout.hpp"
......
......@@ -756,12 +756,15 @@ using namespace std;
if (codegen_module == nullptr)
{
throw runtime_error("function failed to compile");
throw runtime_error("Function failed to compile to bitcode");
}
m_execution_engine->add_module(codegen_module);
m_execution_engine->finalize();
m_compiled_function = m_execution_engine->find_function<EntryPoint_t>(function_name);
assert(m_compiled_function);
if (!m_compiled_function)
{
throw runtime_error("Function failed to compile");
}
m_is_compiled = true;
if (m_release_function)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment