Skip to content

Instantly share code, notes, and snippets.

View appleparan's full-sized avatar

Jongsu Liam Kim appleparan

View GitHub Profile
import pandas as pd
from datasets import load_dataset_builder, load_dataset, Dataset
def main(dataset_name1 = 'kyujinpy/OpenOrca-KO', dataset_name2 = 'Open-Orca/OpenOrca', split='train'):
# Load the dataset builder
builder1 = load_dataset_builder(dataset_name1)
builder2 = load_dataset_builder(dataset_name2)
# kyujinpy/OpenOrca-KO
# id, input, instruction, output
@appleparan
appleparan / Assignment and Broadcasting.md
Last active March 15, 2021 21:24
Julia Korea 답변

와 좋은 질문이네요. 덕분에 저도 원론적인 부분에서 다시 이해를 다잡는 좋은 기회가 되었습니다.

  • 기본적으로 Julia의 Argument Passing 은 "pass-by-sharing"입니다. 이 점을 염두에 두셔야 합니다.

그럼 BenchmarkTools.jl@btimeInteractiveUtils@code_lowered를 이용해서 각자의 코드가 내부적으로 어떻게 동작하는 지 알아봅시다.

  1. test1

Keybase proof

I hereby claim:

  • I am appleparan on github.
  • I am appleparan (https://keybase.io/appleparan) on keybase.
  • I have a public key ASC72HifOLmY_OF7OZd3w4FUxpjbiS6zQvQQ7_enOcMjZgo

To claim this, I am signing this object:

@appleparan
appleparan / complex.c
Created February 5, 2020 05:49
Complex usage in C
#include <stdio.h>
#include <complex.h>
/*
Compile option : icc -std=c99 main.c -o main
*/
int main() {
double complex a;
a = 1.0 + I * 2.0;
using DataFrames
s = DataFrame([[true], [true], [false], [false], [false], [false], [false], [false], [false]],
[:MBF, :SBF, :VOX1, :HCM1, :YHP1, :SFF, :ACE2, :SWI5, :CLN3])
for step in 1:30
last = s[end, :]
new = proceed(last)
push!(s, new)
end
#= /home/appleparan/src/DebugFlux/test_curnn.jl:12 =# Zygote.@code_adjoint(gradient((m->begin
#= /home/appleparan/src/DebugFlux/test_curnn.jl:12 =#
sum(m(x))
end), m)) = Zygote.Adjoint(1: (%4, %5 :: Zygote.Context, %1, %2, %3)
%6 = (ZygoteRules._pullback)(%5, tuple, %2)
%7 = (getindex)(%6, 1)
%8 = (getindex)(%6, 2) %9 = (ZygoteRules._pullback)(%5, Core._apply, ZygoteRules.pullback, %7, %3)
%10 = (getindex)(%9, 1) %11 = (getindex)(%9, 2)
%12 = (ZygoteRules._pullback)(%5, Base.indexed_iterate, %10, 1)
# This file is machine-generated - editing it directly is not advised
[[AbstractFFTs]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "380e36c66edfa099cd90116b24c1ce8cafccac40"
uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c"
version = "0.4.1"
[[AbstractTrees]]
deps = ["Markdown", "Test"]
@appleparan
appleparan / README.md
Last active June 24, 2019 12:38
KSITI Nurion FFTW
  • KNL (Xeon Phi) only

FFTW compilation option

  • Specific compiler option
$ CC=icc CFLAGS="-fast -fPIC -traceback -xCOMMON-AVX512" ./configure --prefix=$HOME/usr/local/fftw_mic/ --enable-avx512 --enable-openmp
$ make && make install
┌ Debug: Initializing CUDA after call to cuMemAlloc
└ @ CUDAnative ~/.julia/packages/CUDAnative/wU0tS/src/init.jl:32
┌ Debug: (Re)compiling function
│ job = CUDAnative.CompilerJob(getfield(GPUArrays, Symbol("##23#24"))(), Tuple{CuArrays.CuKernelState,CuDeviceArray{Float32,1,CUDAnative.AS.Global},Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(CUDAnative.abs),Tuple{Base.Broadcast.Extruded{CuDeviceArray{Float32,1,CUDAnative.AS.Global},Tuple{Bool},Tuple{Int64}}}}}, v"6.1.0", true, nothing, nothing, nothing, nothing)
└ @ CUDAnative ~/.julia/packages/CUDAnative/wU0tS/src/compiler/driver.jl:36
┌ Debug: Compiled getfield(GPUArrays, Symbol("##23#24"))() to PTX 6.1.0 for SM 6.1.0 using 11 registers.
│ Memory usage: 0 bytes local, 0 bytes shared, 256 bytes constant
└ @ CUDAnative ~/.julia/packages/CUDAnative/wU0tS/src/execution.jl:380
┌ Debug: (Re)compiling function
│ job = CUDAnative.CompilerJob(getfield(GPUArrays, Symbol("##23#24"))(), Tuple{CuArrays.CuKernelState,CuDeviceArray{Float32,1,CUDAna
@appleparan
appleparan / CentOS-Base.repo
Created March 10, 2019 00:20
CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#