Validate ndarray dtype in C++ wrapper.
In deployment scenarios, we may accidentally pass in an ndarray with wrong dtype compared to the one required by the compiled kernel, we should throw proper error to users when it happens.
Also we don't check number of args matches compiled kernel so it might segfault without any message, maybe also good to validate that and throw a proper error :D
right! I encounter this issue when I using u8 ndarray as passed value in JIT which parameter is u32 ndarray, taichi JIT convert the type automaticly. But in AOT mode, I pass u8 ndarray to module, the whole algorithm goes wrong ! I think it's neccessory adding the type checker for taichi AOT