Skip to content

Instantly share code, notes, and snippets.

@rtohid
rtohid / halide.sh
Last active September 30, 2021 18:09
#!/bin/bash
CURRENT_DIR=`pwd`
# Build and install Halide
git clone git@github.com:halide/Halide.git
cd ${CURRENT_DIR}/Halide/
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-std=c++17" -S . -B cmake-build-release
cmake --build cmake-build-release/ --parallel
cmake --install cmake-build-release/ --prefix cmake-install-release
__license__ = """
Copyright (c) 2021 R. Tohid (@rtohid)
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)
"""
from youtube_transcript_api import YouTubeTranscriptApi, NoTranscriptFound
from typing import Dict, List
# Copyright (c) 2020 R. Tohid
#
# Distributed under the Boost Software License, Version 1.0. (See a copy at
# http://www.boost.org/LICENSE_1_0.txt)
FROM fedora:latest
RUN dnf -y update
RUN dnf install -y sudo
spack env create flecsi_deps
spack env activate flecsi_deps
spack install -j 24 --only dependencies flecsi backend=hpx %gcc@9.2.1 ^mpich@3.2.1 ^cmake@3.12.4
cd .../flecsi
mkdir build
cd build
../arch/developer-gnu hpx
make -j 16
ctest
@rtohid
rtohid / Dockerfile
Last active December 3, 2019 23:44
FleCSI
# Copyright (c) 2019 R. Tohid
#
# Distributed under the Boost Software License, Version 1.0. (See a copy at
# http://www.boost.org/LICENSE_1_0.txt)
FROM fedora:latest
# Install Packages
RUN dnf -y update
RUN dnf install -y sudo
from phylanx import Phylanx
# import tensorflow as tf
# @tf.function
# def foo():
# a = 2
# print(tf.autograph.to_code(foo.python_function))
# Phylanx: 132f51b699eb1851725d02b4ce6e1cee570a09e5
# HPX: 3418d96f1e811b336cfe1bbfc68c95764cd0e14a
_error = "Segmentation fault (core dumped)"
import numpy as np
from phylanx import Phylanx
@Phylanx(debug=1)
from numba import jit, int32
@jit(int32(int32, int32))
def sum(x, y):
return x + y
; ModuleID = 'sum'
source_filename = "<string>"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@"_ZN08NumbaEnv8__main__7sum$241Eii" = common local_unnamed_addr global i8* null
@.const.sum = internal constant [4 x i8] c"sum\00"
@PyExc_RuntimeError = external global i8
@".const.missing Environment" = internal constant [20 x i8] c"missing Environment\00"
@rtohid
rtohid / gist:6da8a5560c2604199e7c7a2c32c17e6f
Created August 10, 2018 20:18
flecsit CMakeLists.txt
#------------------------------------------------------------------------------#
# Copyright (c) 2014 Los Alamos National Security, LLC
# All rights reserved.
#------------------------------------------------------------------------------#
cmake_minimum_required(VERSION 2.8)
project(flecsit_compile_driver)
find_package(FleCSI REQUIRED)