Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[windows] Add experimental windows build #2868

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Applications/MNIST/jni/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <iomanip>
#include <iostream>
#include <memory>
#include <numeric>
#include <random>
#include <sstream>
#include <vector>
Expand Down
3 changes: 2 additions & 1 deletion Applications/MNIST/jni/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
res_path = meson.current_source_dir() / '..' / 'res'
nntr_mnist_resdir = nntr_app_resdir / 'MNIST'

run_command('cp', '-lr', res_path, nntr_mnist_resdir)
#run_command('cp', '-lr', res_path, nntr_mnist_resdir)
run_command('cmd.exe', 'xcopy', res_path, nntr_mnist_resdir, '/E/H')

mnist_sources = [
'main.cpp'
Expand Down
5 changes: 3 additions & 2 deletions Applications/ProductRatings/jni/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <cmath>
#include <fstream>
#include <iostream>
#include <numeric>
#include <random>
#include <sstream>

Expand Down Expand Up @@ -81,8 +82,8 @@ bool getData(std::ifstream &F, float *input, float *label, unsigned int id) {
return false;

std::istringstream buffer(temp);
uint *input_int = (uint *)input;
uint x;
unsigned int *input_int = (unsigned int *)input;
unsigned int x;
for (unsigned int j = 0; j < feature_size; ++j) {
buffer >> x;
input_int[j] = x;
Expand Down
3 changes: 2 additions & 1 deletion Applications/ProductRatings/jni/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
res_path = meson.current_source_dir() / '..' / 'res'
run_command('cp', '-lr', res_path, nntr_app_resdir / 'ProductRatings')
#run_command('cp', '-lr', res_path, nntr_app_resdir / 'ProductRatings')
run_command('cmd.exe', 'xcopy', res_path, nntr_app_resdir / 'ProductRatings', '/E/H')

e = executable('nntrainer_product_ratings',
'main.cpp',
Expand Down
55 changes: 28 additions & 27 deletions Applications/meson.build
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
nntr_app_resdir = nntrainer_resdir / 'app'
run_command('mkdir', '-p', nntr_app_resdir)
#run_command('mkdir', '-p', nntr_app_resdir)
run_command('cmd.exe', '/C', 'mkdir', nntr_app_resdir)

subdir('utils')
subdir('KNN/jni')
subdir('LogisticRegression/jni')
if enable_ccapi
subdir('MNIST/jni')
if get_option('enable-fp16')
subdir('MixedPrecision/jni')
endif
endif
subdir('VGG/jni')
subdir('Resnet/jni')
subdir('YOLOv2/jni')
subdir('YOLOv3/jni')
subdir('LLaMA/jni')
subdir('Multi_input/jni')
subdir('ReinforcementLearning/DeepQ/jni')
subdir('TransferLearning/CIFAR_Classification/jni')
# if enable_capi
# subdir('TransferLearning/Draw_Classification/jni')
# subdir('KNN/jni')
# subdir('LogisticRegression/jni')
if enable_ccapi
subdir('MNIST/jni')
# if get_option('enable-fp16')
# subdir('MixedPrecision/jni')
endif
# endif
subdir('Custom')
# subdir('VGG/jni')
# subdir('Resnet/jni')
# subdir('YOLOv2/jni')
# subdir('YOLOv3/jni')
# subdir('LLaMA/jni')
# subdir('Multi_input/jni')
# subdir('ReinforcementLearning/DeepQ/jni')
# subdir('TransferLearning/CIFAR_Classification/jni')
# # if enable_capi
# # subdir('TransferLearning/Draw_Classification/jni')
# # endif
# subdir('Custom')
subdir('ProductRatings/jni')
subdir('AlexNet/jni')
subdir('Layers/jni')
if get_option('enable-tflite-backbone')
subdir('SimpleShot')
endif
subdir('PicoGPT/jni')
# subdir('AlexNet/jni')
# subdir('Layers/jni')
# if get_option('enable-tflite-backbone')
# subdir('SimpleShot')
# endif
# subdir('PicoGPT/jni')

subdir('SimpleFC/jni')
# subdir('SimpleFC/jni')
2 changes: 1 addition & 1 deletion Applications/utils/jni/bitmap_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ limitations under the License.
#include <fstream>
#include <iostream>

#include <unistd.h> // NOLINT(build/include_order)
//#include <unistd.h> // NOLINT(build/include_order)

#include "bitmap_helpers.h"

Expand Down
10 changes: 5 additions & 5 deletions api/capi/include/nntrainer_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ extern "C" {
* @note model mutex must be locked before layer lock, if model lock is needed
*/
typedef struct {
uint magic; /**< magic number */
unsigned int magic; /**< magic number */
std::shared_ptr<ml::train::Layer> layer; /**< layer object */
bool in_use; /**< in_use flag */
std::mutex m; /**< mutex for the optimizer */
Expand All @@ -121,7 +121,7 @@ typedef struct {
* optimizer lock is needed
*/
typedef struct {
uint magic;
unsigned int magic;
std::shared_ptr<ml::train::LearningRateScheduler> lr_scheduler;
bool in_use;
std::mutex m;
Expand All @@ -133,7 +133,7 @@ typedef struct {
* needed
*/
typedef struct {
uint magic;
unsigned int magic;
std::shared_ptr<ml::train::Optimizer> optimizer;
ml_train_lr_scheduler *lr_scheduler;
bool in_use;
Expand All @@ -146,7 +146,7 @@ typedef struct {
* @note model mutex must be locked before dataset lock, if model lock is needed
*/
typedef struct {
uint magic; /**< magic number */
unsigned int magic; /**< magic number */
std::array<std::shared_ptr<ml::train::Dataset>, 3>
dataset; /**< dataset object */
bool in_use; /**< in_use flag */
Expand All @@ -158,7 +158,7 @@ typedef struct {
* @since_tizen 6.0
*/
typedef struct {
uint magic; /**< magic number */
unsigned int magic; /**< magic number */
std::shared_ptr<ml::train::Model> model; /**< model object */
std::unordered_map<std::string, ml_train_layer *>
layers_map; /**< layers map */
Expand Down
2 changes: 1 addition & 1 deletion api/ccapi/include/tensor_dim.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class TensorDim {
/**
* @brief get data type size
*/
uint getDataTypeSize() const;
unsigned int getDataTypeSize() const;

/**
* @brief Set the Dim Flag to retrieve effective dimension
Expand Down
Loading