Skip to content

Instantly share code, notes, and snippets.

View ArchRobison's full-sized avatar

Arch D. Robison ArchRobison

  • Nvidia
  • Champaign, IL
View GitHub Profile
@ArchRobison
ArchRobison / session.txt
Last active August 28, 2016 21:27
Output from trying to install Vectorize.jl on MacOS (El Capitan)
...
x bindings/d/sources/
x bindings/d/sources/main.d
x bindings/d/sources/yeppp/
x bindings/d/sources/yeppp/types.d
x bindings/d/sources/yeppp/math.d
x bindings/d/sources/yeppp/library.d
x bindings/d/sources/yeppp/core.d
INFO: ====== Successfully installed Yeppp! ======
TESTING: abs!(Vector{Float32}, Vector{Complex{Float32}})
@ArchRobison
ArchRobison / Vector.jl-install-attempt.txt
Created August 28, 2016 18:46
Attempt to install Vector.jl on Ubuntu
julia> Pkg.clone("http://github.com/rprechelt/Vectorize.jl")
INFO: Initializing package repository /home/archr/.julia/v0.5
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
INFO: Cloning Vectorize from http://github.com/rprechelt/Vectorize.jl
INFO: Computing changes...
INFO: No packages to install, update or remove
INFO: Package database updated
julia> Pkg.build("Vectorize")
INFO: Building Vectorize
@ArchRobison
ArchRobison / matmul.jl
Created March 9, 2016 22:04
Example Program
@noinline function matmul!{N}(C, A, B, ::Type{Val{N}})
@inbounds for i in 1:N, j in 1:N
@simd for k in 1:N
C[k, j] += A[k, i] * B[i, j]
end
end
end
n = 1
A = rand(Float64, n, n)
define void @julia_load_array_of_float([4 x float]* %a, [4 x float]* %b, [4 x float]* %c) {
top:
%a_arr = load [4 x float], [4 x float]* %a, align 4
%a0 = extractvalue [4 x float] %a_arr, 0
%a2 = extractvalue [4 x float] %a_arr, 2
%a1 = extractvalue [4 x float] %a_arr, 1
%b_arr = load [4 x float], [4 x float]* %b, align 4
%b0 = extractvalue [4 x float] %b_arr, 0
%b2 = extractvalue [4 x float] %b_arr, 2
%b1 = extractvalue [4 x float] %b_arr, 1
@ArchRobison
ArchRobison / gist:7356843
Created November 7, 2013 15:50
Patch for fixing zlib linking problem in Julia.
--- a/ui/Makefile
+++ b/ui/Makefile
@@ -55,14 +55,14 @@ julia-readline: $(BUILD)/bin/julia-readline$(EXE)
julia-debug-readline: $(BUILD)/bin/julia-debug-readline$(EXE)
$(BUILD)/bin/julia-basic$(EXE): repl.o repl-basic.o
- @$(call PRINT_LINK, $(CXX) $(LINK_FLAGS) $(SHIPFLAGS) $^ -o $@ -L$(BUILD)/$(JL_PRIVATE_LIBDIR) -L$(BUILD)/$(JL_LIBDIR) $(JLDFLAGS) -ljulia)
+ @$(call PRINT_LINK, $(CXX) $(LINK_FLAGS) $(SHIPFLAGS) $^ -o $@ -L$(BUILD)/$(JL_PRIVATE_LIBDIR) -L$(BUILD)/$(JL_LIBDIR) -ljulia $(JLDFLAGS))
$(BUILD)/bin/julia-debug-basic$(EXE): repl.do repl-basic.do
- @$(call PRINT_LINK, $(CXX) $(LINK_FLAGS) $(DEBUGFLAGS) $^ -o $@ -L$(BUILD)/$(JL_PRIVATE_LIBDIR) -L$(BUILD)/$(JL_LIBDIR) $(JLDFLAGS) -ljulia-debug)
LINK usr/lib/libjulia.so
PERL base/pcre_h.jl
PERL base/errno_h.jl
PERL base/build_h.jl.phony
PERL base/fenv_constants.jl
PERL base/file_constants.jl
PERL base/uv_constants.jl
CC ui/repl.o
CC ui/repl-readline.o
LINK usr/bin/julia-readline
@ArchRobison
ArchRobison / gist:7085135
Created October 21, 2013 14:48
Increases in text and data size caused by compiling Julia with LLVM flag --with--intel-jitevents turned on *and* LLVM flag --disable-threads turnd off. Baseline is with those two flags set differently.
Fiilename Increase of Increase of
Text Size Data Size
bugpoint 0.0176% 0.2122%
dnsimp 0.0000% 0.0000%
fftwf-wisdom 0.0000% 0.0000%
fftw-wisdom 0.0000% 0.0000%
julia-basic 0.0000% 0.0000%
julia-readline 0.0000% 0.0000%
llc 0.0707% 0.3236%
lli 0.2947% 0.6276%
@ArchRobison
ArchRobison / gist:7044371
Created October 18, 2013 16:51
Diff to make Julia compile with "llvm-project - Revision 192983: /llvm/trunk" (https://llvm.org/svn/llvm-project/llvm/trunk/ on 2013-10-18)
diff --git a/src/disasm.cpp b/src/disasm.cpp
index 3dec882..cd67f06 100644
--- a/src/disasm.cpp
+++ b/src/disasm.cpp
@@ -132,7 +132,11 @@ void jl_dump_function_asm(void* Fptr, size_t Fsize,
MCAsmBackend *MAB = 0;
if (ShowEncoding) {
CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);
+#ifdef LLVM34
+ MAB = TheTarget->createMCAsmBackend(*MRI,TripleName, MCPU);
@ArchRobison
ArchRobison / gist:6943072
Created October 11, 2013 22:36
Fragment of julia/deps/llvm-3.3/tools/lli.cpp relevant to enabling Intel VTune Amplifier.
// The following functions have no effect if their respective profiling
// support wasn't enabled in the build configuration.
EE->RegisterJITEventListener(
JITEventListener::createOProfileJITEventListener());
EE->RegisterJITEventListener(
JITEventListener::createIntelJITEventListener());
@ArchRobison
ArchRobison / time_immutable.jl
Created October 30, 2015 18:01
Julia example susing Tuples or Immutable that vectorize if patch http://reviews.llvm.org/D14185 is applied.
import Base.rand
immutable Quad
a :: Float32
b :: Float32
c :: Float32
d :: Float32
end
@inline function add(x::Quad, y::Quad)