On Mon, Mar 27, 2017 at 12:32:30AM +0500, Shoaib Zafar wrote:
> Hi Ryan,
> Thanks for the direction. I was working on it on the weekend. My aim is to
> at least run a snippet form mlpack before proceeding to proposal. My
> findings so far are as follows:
> 
>    - JNI would be used for using C++ functions and code inside java.
>    - We need to compile Armadillo(more on it below) and mlpack separately
>    for each android api (version), and arm architectures (6 architectures
>    exists for now) using specific android toolchains.
>    - We can use either CMake or android.mk to manage the building of c++
>    files inside Android NDK (CMake seems better)
>    - We can have precompiled mlpack and armadillo libraries, which can be
>    included in NDK and used straight away (It is doable without any changes)
> 
> I found that no proper fortan compiler exists for arm (I found one but it
> used dirty hacks). So we need to use c versions of BLAS and LAPACK to go
> with Armadillo. I was able to compile them to .a libraries, but armadillo
> is giving me issues so far.

Hi Shoaib,

Thanks for the in-depth exploration.  I agree that CMake would probably
be the better tool to use, since it is what we're already using for the
rest of the mlpack configuration.

> I am currently using android arm64 toolchain to compile armadillo but it is
> giving errors in linking my precompiled libraries. It seems that something
> is wrong with the Cmake script. You said that you were able to compile
> mlpack on your arm chromebook. How did you managed compilation or inclusion
> of armadillo? (I am sorry for the inconvenience but armadillo's build
> documentation isn't explained enough and time restricts me from going into
> cmake's documentation)

So, on the Chromebook I am running Arch Linux so I can simply install
Armadillo with 'pacman -S armadillo' (I think that's the package name).
For compiling mlpack, I can just follow the usual

$ cmake ../
$ make -j4
(now wait for about 45 minutes...)

to build mlpack.  Armadillo uses CMake internally, but it is a little
bit of an odd setup and if I remember right it doesn't do out-of-source
builds quite right.  So instead of creating a build directory and
configuring CMake inside of it, you would just

$ cmake .

in the CMake root directory.  This should do the detection of any LAPACK
and BLAS replacement on the system, and if that detection isn't
successful that is at least a place to start digging a little deeper.
If you get to that stage and want some more help I can probably give
some more pointers since I've worked with the Armadillo CMake
configuration pretty extensively.

Thanks,

Ryan

-- 
Ryan Curtin    | "Get out of the way!"
[email protected] |   - Train Engineer Assistant
_______________________________________________
mlpack mailing list
[email protected]
http://knife.lugatgt.org/cgi-bin/mailman/listinfo/mlpack

Reply via email to