"model/models/deepseekocr/model.go" did not exist on "8ed1adf3dbda70c5ccfec766f4db4c4a4f3ef948"
Commit 39151d27 authored by Paul's avatar Paul
Browse files

Doc updates

parent c8a8d5d8
......@@ -40,7 +40,7 @@ Of course, this program will always produce the same value which is quite uninte
program p;
instruction_ref x = p.add_parameter("x", {shape::int64_type});
instruction_ref two = p.add_literal(2);
p.add_instruction(add{}, one, two);
p.add_instruction(add{}, x, two);
p.compile(cpu::target{});
This adds a parameter of type ``int64``, and compiles it for the ``cpu``. To run the program, we need to pass the parameter to it when we call `eval <migraph::program::eval>`::
......
......@@ -11,6 +11,11 @@ dead_code_elimination
.. doxygenstruct:: migraph::dead_code_elimination
auto_contiguous
---------------
.. doxygenstruct:: migraph::gpu::auto_contiguous
write_literals
--------------
......
......@@ -61,9 +61,12 @@ struct shape
std::size_t elements() const;
std::size_t bytes() const;
/// Map multiple indices to space index
std::size_t index(std::initializer_list<std::size_t> l) const;
/// Map multiple indices to space index
std::size_t index(const std::vector<std::size_t>& l) const;
/// Map multiple indices from a range of iterator to a space index
template <class Iterator>
std::size_t index(Iterator start, Iterator last) const
{
......@@ -72,12 +75,16 @@ struct shape
return std::inner_product(start, last, this->strides().begin(), std::size_t{0});
}
// Map element index to space index
/// Map element index to space index
std::size_t index(std::size_t i) const;
/// Returns true if the shape is packed with no padding
bool packed() const;
/// Returns true is the shape has been transposed. That is the strides are not in descending order
bool transposed() const;
/// Returns true if the shape is broadcasting a dimension. That is, one of the strides are zero
bool broadcasted() const;
/// Returns true if the shape is in its standard format. That is, the shape is both packed and not transposed.
bool standard() const;
friend bool operator==(const shape& x, const shape& y);
......
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