Giter VIP home page Giter VIP logo

ion-kit's Introduction

Linux MacOS Windows

ion-kit

ion-kit is a graph-based data processing framework. You can define an algorithm in Halide language as a "Building Block" (BB), then form a processing pipeline as a directed acyclic graph (DAG) combining BBs. The pipeline can be optimized and compiled targeting various architectures of CPUs, GPUs, and WebAssembly. You can also run the pipeline immediately on your host machine.

Quick start

You can download the official binary package from release.

If you wish to build using our repository, please use branch release/v1 which utilizes Halide16. We are currently working on migrating to Halide17 on the main branch.

#include <ion/ion.h>

struct MyFilter : ion::BuildingBlock<MyFilter> {
    // This Building Block takes 1 input, 1 output and 1 parameter.
    ion::Input<Halide::Func> input{"input", Int(32), 1};
    ion::Output<Halide::Func> output{"output", Int(32), 1};
    ion::BuildingBlockParam<int32_t> v{"v", 0};

    void generate() {
        Halide::Var i;

        // Increment input elements by value specified as "v"
        output(i) = input(i) + v;
    }
};
ION_REGISTER_BUILDING_BLOCK(MyFilter, my_filter);

int main() {
    int32_t v = 1;

    // ion::Builder is the fundamental class to build a graph.
    ion::Builder b;

    // Set the target architecture same as host.
    b.set_target(ion::get_host_target());

    auto size = 4;

    ion::Buffer<int32_t> input{size};
    input.fill(0);

    // Create sequential graph.
    //
    // input -> my_filter (1st) -> my_filter (2nd) -> output
    //

    // Builder::add() creates Node object from Building Block.
    ion::Node n1 = b.add("my_filter");

    // Input is set by calling Node::operator().
    n1(input);

    // Parameter can be set by Node::set_param();
    n1.set_param(ion::Param("v", 40));

    // Method chain can be used to make it simple.
    auto n2 = b.add("my_filter")(n1["output"]).set_param(ion::Param("v", 2));

    // Bind output buffer.
    ion::Buffer<int32_t> output{size};
    output.fill(0);
    n2["output"].bind(output);

    // Run the pipeline.
    b.run();

    // Or compile into the library.
    b.compile("my_pipeine");

    // Expected output is "42 42 42 42"
    for (int i=0; i<size; ++i) {
        std::cout << output(i) << " ";
    }
    std::cout << std::endl;

    return 0;
}

Assuming binary package is extracted in ION_KIT_PATH.

$ c++ -std=c++17 -fno-rtti main.cc -o main -I ${ION_KIT_PATH}/include -L ${ION_KIT_PATH}/lib -lion-core ${ION_KIT_PATH}/lib/libHalide.so.16 && LD_LIBRARY_PATH=${ION_KIT_PATH}/lib ./main
42 42 42 42

Build

Please follow the instructions provided for your preferred platform.

Authors

The ion-kit is an open-source project created by Fixstars Corporation and its subsidiary companies including Fixstars Solutions Inc, Fixstars Autonomous Technologies.

Remark

This source code is based on results obtained from a project commissioned by the New Energy and Industrial Technology Development Organization (NEDO).

ion-kit's People

Contributors

akmaru avatar fixstars-fujinami avatar fixstars-iizuka avatar fixstars-momoko avatar fixstars-sam avatar iitaku avatar xinyuli1204 avatar yumi-nakasaka-f avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ion-kit's Issues

Auto disposer is not called in graph API

When I use builder.run(), the disposer works fine with simple_graph_jit

~Builder is called
~Builder::Impl is called

However, the graph disposer didn't call ~Impl if I use graph api

      Builder b;
      b.with_bb_module("ion-bb-test");
      b.set_target(Halide::get_host_target());

      Graph g = b.add_graph("graph0");
      Node n;
      n = g.add("test_producer").set_param(Param("v", 41));
      n = g.add("test_consumer")(n["output"], &min0, &extent0, &min1, &extent1, &v);

      ion::Buffer<int32_t> r = ion::Buffer<int32_t>::make_scalar();
      n["output"].bind(r);

      for (int i=0; i<5; ++i) {
          std::cout << i << "'th loop" << std::endl;
          g.run();
      }
~Graph is called
~Builder is called

I expect the correct result to be something like this:

~Graph is called
~Graph::Impl is called
~Builder is called
~Builder::Impl is called

The possible reason may be ownership cycles and looks like a circular dependency chain between graph and builder, causing the shared_ptr to never get cleaned up.
If I change Graph g = b.add_graph("graph0"); to Graph g = Graph(b,"graph0"); It works fine with calling the ~Impl.

Upgrade ion-kit to be compatible with halide17

Context or motivation

Halide has release the latest v17.0.1

Goal

we want ion-kit to be compatible with the latest halide
Two major change is:

  1. ParamMap has been removed entirely from the public API. (we should remove our portmap as well)
  2. Halide::Parameter has been moved to the public Halide API (it was formerly "internal" and not intended for public use).

TODO

  • update github cdci
  • remove portmap
  • make Halide::internal::Parameter as public api

Publish Python binding

  • Better syntax for Builder/Node/Port (Backlog)
  • Design reference counting for c_ion objects (Backlog)
  • Publish on PyPI
    • Package Naming
    • Versioning
    • Allows users to install by pip install <name of the module>

CICD for Python module release

CICD has the following steps:

  • 1. Creating wheels for Windows, Linux, and Mac OS, triggered by tag v*
  • 2. Atomically upload and create test .pypi.org for that version
  • 3. Test to install on Windows, Linux, and Mac OS
  • 4. If 3 are all passed, upload and create actual pypi.org

Test for the step 3 is the following:

from ionpy import Builder

builder = Builder()
builder.set_target(target='host')
builder.with_bb_module(path='ion-bb')

wrong URL for tests and examples

The URLs on tests and examples are not working.

Could you please share the following URLs so that I can fix them.

with_bb_module not work

with ionpy 1.2.0, the line to load dynamic module caused the error. The program works without the following line.

builder.with_bb_module('ion-bb') 

Polymorphic U3V class implementation

U3V class has flags to control behavior.

  • simulation mode
  • camera mode
  • frame sync

These can be simplified and reorganized using class polymorphism.

Fix port index access in capi

Context

auto p = new Port(reinterpret_cast<Port>(obj));
p->set_index(index);
ptr = reinterpret_cast<ion_port_t>(p);
reinterpret_castion::Port
(obj)->set_index(index);

obj doen't need to set_index, otherwise have issue on following example
p0 = ports[0] (make a copy of ports and set index to 0)
p1 = ports[1] (make a copy of ports and set index to 1)
when access ports again, the index of ports will be 1 instead of -1

Done

resolved in #263

Improve build instructions and prerequisites so building opencv and llm are not skipped

(venv3) anand@tufb2lap:~/ion-kit-stuff/ion-kit/build$ cmake -D CMAKE_TOOLCHAIN_FILE=${VCPKG_PATH}/scripts/buildsystems/vcpkg.cmake -D Halide_DIR=${HALIDE_PATH}/lib/cmake/Halide -D HalideHelpers_DIR=${HALIDE_PATH}/lib/cmake/HalideHelpers -DCMAKE_BUILD_TYPE=Release -D ION_BUILD_TEST=ON -D ION_BUILD_EXAMPLE=ON ..
cmake --build .
-- Running vcpkg install
Detecting compiler hash for triplet x64-linux...
Compiler found: /usr/bin/c++
All requested packages are currently installed.
Total install time: 230 ns
libjpeg-turbo is compatible with built-in implementation-agnostic CMake targets:

    find_package(JPEG REQUIRED)
    target_include_directories(main PRIVATE JPEG::JPEG)

libjpeg-turbo provides CMake targets for the TurboJPEG C API:

    find_package(libjpeg-turbo CONFIG REQUIRED)
    target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:libjpeg-turbo::turbojpeg>,libjpeg-turbo::turbojpeg,libjpeg-turbo::turbojpeg-static>)

The package zlib is compatible with built-in CMake targets:

    find_package(ZLIB REQUIRED)
    target_link_libraries(main PRIVATE ZLIB::ZLIB)

The package libpng is compatible with built-in CMake targets:

    find_package(PNG REQUIRED)
    target_link_libraries(main PRIVATE PNG::PNG)

-- Running vcpkg install - done
-- Halide 'host' platform triple:   x86-64-linux
-- Halide 'cmake' platform triple:  x86-64-linux
-- Halide default AOT target:       host
CMake Warning (dev) at /home/anand/ion-kit-stuff/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
  Policy CMP0146 is not set: The FindCUDA module is removed.  Run "cmake
  --help-policy CMP0146" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

Call Stack (most recent call first):
  CMakeLists.txt:33 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Version: v1.7.0-40-gd021033
Skip building "dnn"
Skip building "fpga"
Skip building "opencv"
Skip building "llm"
-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: /home/anand/ion-kit-stuff/ion-kit/build
[ 13%] Built target ion-core
[ 15%] Linking CXX shared library libion-bb.so
[ 16%] Built target ion-bb
[ 17%] Linking CXX shared library libion-bb-test.so
[ 18%] Built target ion-bb-test
[ 20%] Linking CXX executable c_api_jit
[ 21%] Built target c_api_jit
[ 22%] Linking CXX executable error_jit
[ 24%] Built target error_jit
[ 25%] Linking CXX executable metadata_jit
[ 26%] Built target metadata_jit
[ 27%] Linking CXX executable multi_out_jit
[ 29%] Built target multi_out_jit
[ 30%] Linking CXX executable array_inout_jit
[ 31%] Built target array_inout_jit
[ 32%] Linking CXX executable array_input_jit
[ 34%] Built target array_input_jit
[ 35%] Linking CXX executable array_output_jit
[ 36%] Built target array_output_jit
[ 37%] Linking CXX executable array_dup_names_jit
[ 39%] Built target array_dup_names_jit
[ 40%] Linking CXX executable inverted_dep_jit
[ 41%] Built target inverted_dep_jit
[ 43%] Linking CXX executable dup_jit
[ 44%] Built target dup_jit
[ 45%] Linking CXX executable port-binding_jit
[ 46%] Built target port-binding_jit
[ 48%] Linking CXX executable port-assign_jit
[ 49%] Built target port-assign_jit
[ 50%] Linking CXX executable direct-extern_jit
[ 51%] Built target direct-extern_jit
[ 53%] Linking CXX executable gpu-extern_jit
[ 54%] Built target gpu-extern_jit
[ 55%] Linking CXX shared library libgpu-extern-lib.so
[ 56%] Built target gpu-extern-lib
[ 58%] Linking CXX executable dup-port-name_jit
[ 59%] Built target dup-port-name_jit
[ 60%] Linking CXX executable configure_jit
[ 62%] Built target configure_jit
[ 63%] Linking CXX executable export_jit
[ 64%] Built target export_jit
[ 65%] Linking CXX executable validation_jit
[ 67%] Built target validation_jit
[ 68%] Linking CXX executable multi_pipe_jit
[ 69%] Built target multi_pipe_jit
[ 70%] Linking CXX executable graph_jit
[ 72%] Built target graph_jit
[ 73%] Linking CXX executable compile/simple_graph_compile
[ 74%] Built target simple_graph_compile
[ 75%] Generating compile/simple_graph_compile_out/simple_graph.h, compile/simple_graph_compile_out/simple_graph.a
Passed
[ 77%] Building CXX object test/CMakeFiles/simple_graph_aot.dir/simple_graph_run.cc.o
[ 78%] Linking CXX executable simple_graph_aot
[ 79%] Built target simple_graph_aot
[ 81%] Linking CXX executable simple_graph_jit
[ 82%] Built target simple_graph_jit
[ 83%] Linking CXX executable compile/complex_graph_compile
[ 84%] Built target complex_graph_compile
[ 86%] Generating compile/complex_graph_compile_out/complex_graph.h, compile/complex_graph_compile_out/complex_graph.a
Passed
[ 87%] Building CXX object test/CMakeFiles/complex_graph_aot.dir/complex_graph_run.cc.o
[ 88%] Linking CXX executable complex_graph_aot
[ 89%] Built target complex_graph_aot
[ 91%] Linking CXX executable complex_graph_jit
[ 92%] Built target complex_graph_jit
[ 93%] Linking CXX executable compile/producerx3_compile
[ 94%] Built target producerx3_compile
[ 96%] Generating compile/producerx3_compile_out/producerx3.h, compile/producerx3_compile_out/producerx3.a
[ 97%] Building CXX object example/CMakeFiles/producerx3_aot.dir/producerx3_run.cc.o
[ 98%] Linking CXX executable producerx3_aot
[100%] Built target producerx3_aot
(venv3) anand@tufb2lap:~/ion-kit-stuff/ion-kit/build$ 

Fix/Separate bin file

Context or motivation

Current two sensors will store in single bin file

Goal

we want save one in each

TODO

  • separate them and store one in each bin file,
  • add prefix to determine filename (eg. prefix = "sensor_0" ---> bin file name: sensor_0.bin)

Get rid of OpenCV dependency as much as possible

  • Remove OpenCV link dependency from the image-io bb
    • Use DynamicModule and symbol loading instead of header include and link library
    • Use OpenCV C-API instead of C++ API for ABI compatibility
    • If the OpenCV library is not found at runtime, it can fail with the error log
  • Keep OpenCV link dependency in the dnn bb because it seems to be impossible to replace with C-API

Here is the prototype branch.

dispose not work on ionpy

While C++ ion-kit 1.2.0 works with dispose U3V device appropriately, ionpy 1.2.0 has stopped in the middle of the process of dispose.

[2024-01-27 10:03:12.384] [ion] [debug] Trying to call dispose from distructor since disposed_ is false 
[2024-01-27 10:03:12.385] [ion] [debug] U3V::dispose() :: is called 

Allow port-access in the pipeline

Currently, the output in the form of Halide::Func[] allows access to each buffer after port mapping from the output port of a pipeline.

TODO:

  • Add the feature to access each buffer by index so that each buffer can be used as an input for the following BB.
  • Update the Python bindings along with the above change.

Use API to get PixelFormat PFNC values

Currently we have limited GenICam pixelformat to write down to device info config as follows:

src/bb/image-io/rt_common.h

// PFNC
// https://www.emva.org/wp-content/uploads/GenICamPixelFormatValues.pdf
#define PFNC_Mono8      0x01080001
#define PFNC_Mono10     0x01100003
#define PFNC_Mono12     0x01100005
#define PFNC_RGB8       0x02180014
#define PFNC_BGR8       0x02180015

src/bb/image-io/rt_u3v.h

int32_t px =
    pixel_format_ == "RGB8" ? PFNC_RGB8 :
    pixel_format_ == "GBR8" ? PFNC_BGR8 :
    pixel_format_ == "Mono8" ? PFNC_Mono8 :
    pixel_format_ == "Mono10" ? PFNC_Mono10 :
    pixel_format_ == "Mono12" ? PFNC_Mono12 : 0;

Instead, we should obtain those hex value with Aravis API dup_available_enumeration_feature_values.

Dispose U3V instance gracefully

Calling U3V::dispose will triger U3V's destructor.
We need to change this behavior by following:

  • u3v_camera1, u3v_camera2, camera_frame_count should hold instance by map unordered_map<string, std::shared_ptr<U3V> > which has uuid as a key, pointer as a value.
  • UUID should be generated in U3VCamera1/2::generate() and passed as id.
  • U3v::dispose will only stop acquisition and unref streams and devices.
  • Calling arv_shutdown is no longer needed.

Ordering of auto dispose

Reported in #245. I confirmed it happens on our test (simple_graph_jit).

17f645c:

ION_LOG_LEVEL=debug LD_LIBRARY_PATH=./test ./test/simple_graph_jit                                                                                                                        ion-kit/git/main !
[2024-02-27 13:14:07.133] [ion] [debug] ion-kit version is v1.6.0-23-gfbf23bb
[2024-02-27 13:14:07.133] [ion] [debug] Determine free port _ion_iport_0 as input on Node 60a2b9b8-83a5-4451-9329-bedfceb598ed
[2024-02-27 13:14:07.133] [ion] [debug] Determine free port _ion_iport_1 as min0 on Node 60a2b9b8-83a5-4451-9329-bedfceb598ed
[2024-02-27 13:14:07.133] [ion] [debug] Determine free port _ion_iport_2 as extent0 on Node 60a2b9b8-83a5-4451-9329-bedfceb598ed
[2024-02-27 13:14:07.133] [ion] [debug] Determine free port _ion_iport_3 as min1 on Node 60a2b9b8-83a5-4451-9329-bedfceb598ed
[2024-02-27 13:14:07.133] [ion] [debug] Determine free port _ion_iport_4 as extent1 on Node 60a2b9b8-83a5-4451-9329-bedfceb598ed
[2024-02-27 13:14:07.134] [ion] [debug] Determine free port _ion_iport_5 as v on Node 60a2b9b8-83a5-4451-9329-bedfceb598ed
0'th loop
[2024-02-27 13:14:07.134] [ion] [info] Start building pipeline
[2024-02-27 13:14:07.134] [ion] [info] Builder::register_disposer
[2024-02-27 13:14:07.134] [ion] [info] consume_dispose is called with id=60a2b9b8-83a5-4451-9329-bedfceb598ed
[2024-02-27 13:14:07.617] [ion] [debug] Inserted "___ion_port_0" instance at #4
[2024-02-27 13:14:07.617] [ion] [debug] Inserted "___ion_port_$10" instance at #0
[2024-02-27 13:14:07.617] [ion] [debug] Inserted "___ion_port_$20" instance at #1
[2024-02-27 13:14:07.617] [ion] [debug] Inserted "___ion_port_$30" instance at #2
[2024-02-27 13:14:07.617] [ion] [debug] Inserted "___ion_port_$40" instance at #3
[2024-02-27 13:14:07.617] [ion] [debug] Inferred arguments stub
[2024-02-27 13:14:07.626] [ion] [debug]   #0 name(___ion_port_$10) kind(InputScalar) dimensions(0) type(int32_t)
[2024-02-27 13:14:07.627] [ion] [debug]   #1 name(___ion_port_$20) kind(InputScalar) dimensions(0) type(int32_t)
[2024-02-27 13:14:07.627] [ion] [debug]   #2 name(___ion_port_$30) kind(InputScalar) dimensions(0) type(int32_t)
[2024-02-27 13:14:07.627] [ion] [debug]   #3 name(___ion_port_$40) kind(InputScalar) dimensions(0) type(int32_t)
[2024-02-27 13:14:07.627] [ion] [debug]   #4 name(___ion_port_0) kind(InputScalar) dimensions(0) type(int32_t)
[2024-02-27 13:14:07.627] [ion] [debug] Generating arguments instance
[2024-02-27 13:14:07.627] [ion] [debug]   #0 0x7ffc5085a4c0
[2024-02-27 13:14:07.627] [ion] [debug]   #1 0x7ffc5085a4c4
[2024-02-27 13:14:07.627] [ion] [debug]   #2 0x7ffc5085a4c8
[2024-02-27 13:14:07.627] [ion] [debug]   #3 0x7ffc5085a4cc
[2024-02-27 13:14:07.627] [ion] [debug]   #4 0x7ffc5085a4bc
[2024-02-27 13:14:07.627] [ion] [debug]   #5 0x557e4e299f28
[2024-02-27 13:14:07.627] [ion] [info] consume is called with id=60a2b9b8-83a5-4451-9329-bedfceb598ed
42 42 
42 42 
1'th loop
[2024-02-27 13:14:07.627] [ion] [info] consume is called with id=60a2b9b8-83a5-4451-9329-bedfceb598ed
42 42 
42 42 
2'th loop
[2024-02-27 13:14:07.627] [ion] [info] consume is called with id=60a2b9b8-83a5-4451-9329-bedfceb598ed
42 42 
42 42 
3'th loop
[2024-02-27 13:14:07.627] [ion] [info] consume is called with id=60a2b9b8-83a5-4451-9329-bedfceb598ed
42 42 
42 42 
4'th loop
[2024-02-27 13:14:07.627] [ion] [info] consume is called with id=60a2b9b8-83a5-4451-9329-bedfceb598ed
42 42 
42 42 
[2024-02-27 13:14:07.627] [ion] [info] consume_dispose is called with id=60a2b9b8-83a5-4451-9329-bedfceb598ed
Passed

v1.6.0:

ION_LOG_LEVEL=debug LD_LIBRARY_PATH=./test ./test/simple_graph_jit                                                                                                                 ion-kit/git/tags/v1.6.0 !
[2024-02-27 13:17:14.663] [ion] [debug] ion-kit version is v1.6.0
[2024-02-27 13:17:14.664] [ion] [debug] Determine free port _ion_iport_0 as input on Node 2b7daac1-9c0b-4aae-beed-beccfe1b9f49
[2024-02-27 13:17:14.664] [ion] [debug] Determine free port _ion_iport_1 as min0 on Node 2b7daac1-9c0b-4aae-beed-beccfe1b9f49
[2024-02-27 13:17:14.664] [ion] [debug] Determine free port _ion_iport_2 as extent0 on Node 2b7daac1-9c0b-4aae-beed-beccfe1b9f49
[2024-02-27 13:17:14.664] [ion] [debug] Determine free port _ion_iport_3 as min1 on Node 2b7daac1-9c0b-4aae-beed-beccfe1b9f49
[2024-02-27 13:17:14.664] [ion] [debug] Determine free port _ion_iport_4 as extent1 on Node 2b7daac1-9c0b-4aae-beed-beccfe1b9f49
[2024-02-27 13:17:14.664] [ion] [debug] Determine free port _ion_iport_5 as v on Node 2b7daac1-9c0b-4aae-beed-beccfe1b9f49
0'th loop
[2024-02-27 13:17:14.664] [ion] [info] Start building pipeline
[2024-02-27 13:17:14.664] [ion] [info] Builder::register_disposer
[2024-02-27 13:17:15.156] [ion] [info] consume is called with id=2b7daac1-9c0b-4aae-beed-beccfe1b9f49
42 42 
42 42 
1'th loop
[2024-02-27 13:17:15.156] [ion] [info] consume is called with id=2b7daac1-9c0b-4aae-beed-beccfe1b9f49
42 42 
42 42 
2'th loop
[2024-02-27 13:17:15.156] [ion] [info] consume is called with id=2b7daac1-9c0b-4aae-beed-beccfe1b9f49
42 42 
42 42 
3'th loop
[2024-02-27 13:17:15.156] [ion] [info] consume is called with id=2b7daac1-9c0b-4aae-beed-beccfe1b9f49
42 42 
42 42 
4'th loop
[2024-02-27 13:17:15.156] [ion] [info] consume is called with id=2b7daac1-9c0b-4aae-beed-beccfe1b9f49
42 42 
42 42 
[2024-02-27 13:17:15.156] [ion] [info] consume_dispose is called with id=2b7daac1-9c0b-4aae-beed-beccfe1b9f49
Passed

@xinyuli1204 Can you try to figure it out the reason and fix it?

Naming convention

All external functions should follow same naming rule as follows:

  • Stating with prefix which is all C++ namespace is concatenated by underscore

Consistent Python Binding implementation along C++

  • 1. The type of Param Value along C++
  • 2. Allow Vector/List to bind

1. The type of Param Value along C++

ion-kit 1.0.0 takes int/boolean/double value for Params of BB, but Python binding takes only string

e.g.

C++

...
      .set_param(
        Param("num_devices", num_device),
        Param("frame_sync", true),
        Param("realtime_diaplay_mode", false)
      );

Python

# set params
num_devices = Param('num_devices', str(num_device))
pixel_format_ptr = Param('realtime_diaplay_mode', 'true')
frame_sync = Param('frame_sync', 'false')

We would like to make Python API look like:

Python

# set params
num_devices = Param('num_devices', num_device)
pixel_format_ptr = Param('realtime_diaplay_mode', True)
frame_sync = Param('frame_sync', False)

2. Allow Vector/List to bind

ion-kit 1.0.0 allows users to bind vector of buffer as follows:

C++

std::vector< int > buf_size = std::vector < int >{ width, height };
    if (pixel_format == "RGB8"){
        buf_size.push_back(3);
    }
    std::vector<Halide::Buffer<T>> output;
    for (int i = 0; i < num_device; ++i){
      output.push_back(Halide::Buffer<T>(buf_size));
    }
    n["output"].bind(output);

However, python version does not allow to bind (port-map) from multiple output in a single port to List of Buffers, so we have to do one by one as follows by accessing the index:

Python

    # create halide buffer for output port
    outputs = []
    output_size = (width, height, )
    if pixelformat == "RGB8":
        output_size += (3,)
    outputs.append(Buffer(Type(TypeCode.Uint, depth_of_buffer, 1), output_size))

    # set I/O ports
    output_p[0].bind(outputs[0])

We want to allow user to bind from multiple output to List of buffer.

Error when compiled with Halide-10.0.1

Compiling target complex_graph_aot_test makes following error

terminate called after throwing an instance of 'Halide::CompileError'
  what():  Error: All Params and embedded Buffers must have unique names, but the name 'height' was seen multiple times.

Halide 10.0.1 strictly check the parameter identity not only by name, but also contents ptr.

image_io_binarysaver need to bind color_channel port

BinarySaver

Before ion-kit -1.0 we need to pass color channel as an input port color_channel_p = Port('color_channel', Type(TypeCode.Int, 32, 1), 0)
but we don't need to set any value to the color_channel_p in port map, since actually in building block we don't even use it.

When ion-kit >=1.0, we still need to bind the value to color channel port even this param is useless in image_io_binarysaver
eg.
color_channel_p.bind(2)
Otherwise will throw this error
[2024-02-07 06:02:18.033] [ion] [error] Error: Output buffer output$1 has type int32 but type of the buffer passed in is bad_type_code198x38458

Will get rid of the color_channel Para later

Fix/Separate gendc bin file

Context or motivation

Similar as #266
Gendc buffer from two sensors will split and store into two bin file

Goal

we want save one in each

TODO

  • separate them and store one in each bin file,
  • add prefix to determine filename (eg. prefix = "gendc_0" ---> bin file name: gendc_0.bin)

Support implicit I/O mapping feature

Some framework built on the ion-kit requires dynamic parameters. The dynamic parameters are preferred to be implemented as BuildingBlock::Input or BuildingBlock::Output. But, currently, Input should be bound with ion::Buffer or another port. Output can be unbound, but it is not evaluated if Output is unbound. This enforces framework/application to connect all dynamic parameters explicitly. Our motivation is to support dynamic parameters without connecting these ports with others on the Framework layer by providing API to determine unbound I/O port.

We will implement:

  • API to iterate unbound I/O on ion::Builder and ion::Graph

Framework can iterate unbound I/O and they can bind it with arbitrary address.

MacOS Symlink Broken for Halide

  • Symlink between libHalide.16.0.0.dylib and libHalide.16.dylib seem to be broken
swang@Sams-MBA simple-app-cmake % file /Users/swang/Documents/Projects/angular-aiq/simple-app-cmake/cxx/ion-kit/ion-kit-1.7.0-arm-64-macos/lib/libHalide.dylib
/Users/swang/Documents/Projects/angular-aiq/simple-app-cmake/cxx/ion-kit/ion-kit-1.7.0-arm-64-macos/lib/libHalide.dylib: broken symbolic link to @rpath/libHalide.16.dylib

Remove platform dependency from BBs

For example, image_io_imx219 is only available on LInux. But it is better to fallback to simulation mode if the hardware is not supported on the platform.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.