Skip to content

Instantly share code, notes, and snippets.

in src.sh we have:
#!/bin/bash
#SBATCH -N 4
#SBATCH -n 4
#SBATCH -p marvin
#SBATCH --time=72:00:00
#SBATCH --job-name=conv_%j
#SBATCH --output=res-%j.txt
#SBATCH --error=error-%j.txt
9>C:\Repos\vcpkg\installed\x64-windows\include\blaze\math\expressions\DVecDVecMapExpr.h(479,1): error C2440: 'return': cannot convert from 'Return' to 'double &' (compiling source file C:\Repos\phylanx\src\plugins\keras_support\hard_sigmoid_operation.cpp)
9>C:\Repos\vcpkg\installed\x64-windows\include\blaze\math\expressions\DVecDVecMapExpr.h(477): message : while compiling class template member function 'double &blaze::DVecDVecMapExpr<VT1,VT2,OP,false>::operator [](size_t) const'
9> with
9> [
9> VT1=blaze::UniformVector<double,false,blaze::Group0>,
9> VT2=blaze::DVecDVecAddExpr<blaze::DVecDVecMultExpr<blaze::CustomVector<double,blaze::aligned,blaze::padded,false,blaze::Group0,blaze::DynamicVector<double,false,blaze::Group0>>,blaze::UniformVector<double,false,blaze::Group0>,false>,blaze::UniformVector<double,false,blaze::Group0>,false>,
9> OP=blaze::Min
9> ] (compiling source file C:\Repos\phylanx\src\plugins\keras_support\hard_sigmoid_operation.cpp)
9>C:\R
@taless474
taless474 / Testing Phylanx on docker
Created May 20, 2020 16:42
Using stellargroup/hpx:dev image
docker pull stellargroup/hpx:dev
docker run --rm -it -v C:\Repos\:/repos stellargroup/hpx:dev bash
apt-get update
apt-get install --yes --no-install-recommends python3 python3-dev python3-pip libblas-dev liblapack-dev libhdf5-dev
apt-get purge && apt-get clean && rm -rf /var/lib/apt/lists/*
pip3 --no-cache-dir install setuptools
pip3 --no-cache-dir install pytest
pip3 --no-cache-dir install numpy
pip3 --no-cache-dir install astpretty
@taless474
taless474 / Phylanx Docker script
Created May 20, 2020 16:36
Using stellargroup/phylanx_base image
docker pull stellargroup/phylanx_base:prerequisites
docker run --rm -it --security-opt seccomp=unconfined -v C:\Repos\:/repos stellargroup/phylanx_base:prerequisites bash
# to get the blaze_tensor from the repo:
# git clone https://github.com/STEllAR-GROUP/blaze_tensor.git --depth=1 /blaze_tensor
cmake -H/repos/blaze_tensor -B/blaze_tensor/build
cmake --build /blaze_tensor/build --target install
docker image prune -f
void test_expand_dims_1d_3()
{
if (hpx::get_locality_id() == 0)
{
test_expand_dims_operation("test_expand_dims_2loc1d_3", R"(
expand_dims(
annotate_d([1., 2., 3., 4.], "array_3",
list("tile", list("columns", 4, 8)))
, -1)
)", R"(
void test_shape_2d_0()
{
if (hpx::get_locality_id() == 0)
{
test_shape_d_operation("test_shape_2loc2d_0", R"(
shape(annotate_d([[-1,-2,-3], [1, 2, 3]], "array",
list("tile", list("rows", 1, 3), list("columns", 0, 3))))
)", "list(2, 3)");
}
else
char const* const kmeans_code = R"(
define(closest_centroids, points, centroids, block(
define(expanded_centroids,
reshape(centroids, list(shape(centroids, 0), 1, 2))
),
define(distances,
sqrt(sum(square(points - expanded_centroids), 2))
),
argmin(distances, 0)
))
// Copyright (c) 2020 Bita Hasheminezhad
// Copyright (c) 2020 Hartmut Kaiser
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <phylanx/phylanx.hpp>
#include <hpx/hpx_init.hpp>
@taless474
taless474 / CMakeLists.txt
Created September 26, 2019 15:30
prog cmake
cmake_minimum_required(VERSION 3.3.2)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
option(APP1_BLAZE_TENSOR_DIR "Path to BlazeTensor" "")
project(blaze_app_1 CXX)
find_package(HPX REQUIRED)