mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-19 04:37:51 +00:00
f96e1c5b78
* sync : ggml (backend v2, k-quants, CUDA opts, Metal opts, etc.) * metal : allow env metal variable to override resource path (#1415) * Allow env variable to override resource path * Update ggml-metal.m --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> * sync : restore common / main from `master` * sync : restore whisper from `master` * talk-llama : update to latest llama.cpp * ruby : fix build * ggml : fix 32-bit ARM build * ggml : fix MIN / MAX macro collisions + update ios bindings * ggml : fix ifdefs and MIN / MAX again * exampels : fix Obj-C and Swift examples * ggml : fix 32-bit ARM compatibility * ggml : one more attempt to fix 32-bit ARM compat * whisper : fix support for larger graphs --------- Co-authored-by: Chris Raethke <codesoda@users.noreply.github.com>
30 lines
1.4 KiB
Ruby
30 lines
1.4 KiB
Ruby
require 'mkmf'
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','whisper.cpp')} .")
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','whisper.h')} .")
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','ggml.h')} .")
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','ggml.c')} .")
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','ggml-impl.h')} .")
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','ggml-alloc.h')} .")
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','ggml-alloc.c')} .")
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','ggml-backend-impl.h')} .")
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','ggml-backend.h')} .")
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','ggml-backend.c')} .")
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','ggml-quants.h')} .")
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','ggml-quants.c')} .")
|
|
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','examples','dr_wav.h')} .")
|
|
|
|
|
|
# need to use c++ compiler flags
|
|
$CXXFLAGS << ' -std=c++11'
|
|
# Set to true when building binary gems
|
|
if enable_config('static-stdlib', false)
|
|
$LDFLAGS << ' -static-libgcc -static-libstdc++'
|
|
end
|
|
|
|
if enable_config('march-tune-native', false)
|
|
$CFLAGS << ' -march=native -mtune=native'
|
|
$CXXFLAGS << ' -march=native -mtune=native'
|
|
end
|
|
|
|
create_makefile('whisper')
|