-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ruby : Follow source tree change (#2580)
* Follow whisper.cpp source tree change * Update whispercpp.gemspec * Follow whisper.cpp log level change * Fix paths in GitHub workflow for Ruby bindings * Use GitHub workflow setting for dependency definition * Use ternary operator
- Loading branch information
1 parent
37c8802
commit 8c6a9b8
Showing
11 changed files
with
116 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,14 @@ | ||
Makefile | ||
ggml.c | ||
ggml.h | ||
ggml-alloc.c | ||
ggml-alloc.h | ||
ggml-aarch64.c | ||
ggml-aarch64.h | ||
ggml-backend.cpp | ||
ggml-backend-impl.h | ||
ggml-backend.c | ||
ggml-backend.h | ||
ggml-common.h | ||
ggml-cpu-impl.h | ||
ggml-metal.m | ||
ggml-metal.metal | ||
ggml-metal-embed.metal | ||
ggml-blas.cpp | ||
ggml-cuda.h | ||
ggml-impl.h | ||
ggml-kompute.h | ||
ggml-metal.h | ||
ggml-opencl.h | ||
ggml-quants.c | ||
ggml-quants.h | ||
ggml-sycl.h | ||
ggml-vulkan.h | ||
ggml-blas.h | ||
get-flags.mk | ||
whisper.cpp | ||
whisper.h | ||
dr_wav.h | ||
depend | ||
whisper.bundle | ||
whisper.so | ||
whisper.bundle | ||
whisper.dll | ||
depend | ||
scripts/get-flags.mk | ||
*.o | ||
*.c | ||
*.cpp | ||
*.h | ||
*.m | ||
*.metal | ||
!ruby_whisper.cpp | ||
!ruby_whisper.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ggml/src/ggml-cpu/ggml-cpu-cpp.o: \ | ||
ggml/src/ggml-cpu/ggml-cpu.cpp \ | ||
ggml/include/ggml-backend.h \ | ||
ggml/include/ggml.h \ | ||
ggml/include/ggml-alloc.h \ | ||
ggml/src/ggml-backend-impl.h \ | ||
ggml/include/ggml-cpu.h \ | ||
ggml/src/ggml-impl.h | ||
$(CXX) $(CXXFLAGS) -c $< -o $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
ggml-metal-embed.o: \ | ||
ggml-metal.metal \ | ||
ggml-common.h | ||
ggml/src/ggml-metal/ggml-metal-embed.o: \ | ||
ggml/src/ggml-metal/ggml-metal.metal \ | ||
ggml/src/ggml-metal/ggml-metal-impl.h \ | ||
ggml/src/ggml-common.h | ||
@echo "Embedding Metal library" | ||
@sed -e '/#include "ggml-common.h"/r ggml-common.h' -e '/#include "ggml-common.h"/d' < ggml-metal.metal > ggml-metal-embed.metal | ||
$(eval TEMP_ASSEMBLY=$(shell mktemp)) | ||
@echo ".section __DATA, __ggml_metallib" > $(TEMP_ASSEMBLY) | ||
@echo ".globl _ggml_metallib_start" >> $(TEMP_ASSEMBLY) | ||
@echo "_ggml_metallib_start:" >> $(TEMP_ASSEMBLY) | ||
@echo ".incbin \"ggml-metal-embed.metal\"" >> $(TEMP_ASSEMBLY) | ||
@echo ".globl _ggml_metallib_end" >> $(TEMP_ASSEMBLY) | ||
@echo "_ggml_metallib_end:" >> $(TEMP_ASSEMBLY) | ||
@$(AS) $(TEMP_ASSEMBLY) -o $@ | ||
@rm -f ${TEMP_ASSEMBLY} | ||
@sed -e '/__embed_ggml-common.h__/r ggml/src/ggml-common.h' -e '/__embed_ggml-common.h__/d' < ggml/src/ggml-metal/ggml-metal.metal > ggml/src/ggml-metal/ggml-metal-embed.metal.tmp | ||
@sed -e '/#include "ggml-metal-impl.h"/r ggml/src/ggml-metal/ggml-metal-impl.h' -e '/#include "ggml-metal-impl.h"/d' < ggml/src/ggml-metal/ggml-metal-embed.metal.tmp > ggml/src/ggml-metal/ggml-metal-embed.metal | ||
$(eval TEMP_ASSEMBLY=$(shell mktemp -d)) | ||
@echo ".section __DATA, __ggml_metallib" > $(TEMP_ASSEMBLY)/ggml-metal-embed.s | ||
@echo ".globl _ggml_metallib_start" >> $(TEMP_ASSEMBLY)/ggml-metal-embed.s | ||
@echo "_ggml_metallib_start:" >> $(TEMP_ASSEMBLY)/ggml-metal-embed.s | ||
@echo ".incbin \"ggml/src/ggml-metal/ggml-metal-embed.metal\"" >> $(TEMP_ASSEMBLY)/ggml-metal-embed.s | ||
@echo ".globl _ggml_metallib_end" >> $(TEMP_ASSEMBLY)/ggml-metal-embed.s | ||
@echo "_ggml_metallib_end:" >> $(TEMP_ASSEMBLY)/ggml-metal-embed.s | ||
$(CC) $(CFLAGS) -c $(TEMP_ASSEMBLY)/ggml-metal-embed.s -o $@ | ||
@rm -f ${TEMP_ASSEMBLY}/ggml-metal-embed.s | ||
@rmdir ${TEMP_ASSEMBLY} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ggml/src/ggml-metal/ggml-metal.o: \ | ||
ggml/src/ggml-metal/ggml-metal.m \ | ||
ggml/src/ggml-metal/ggml-metal-impl.h \ | ||
ggml/include/ggml-metal.h \ | ||
ggml/include/ggml.h | ||
$(CC) $(CFLAGS) -c $< -o $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
require "yaml" | ||
|
||
sources = `git ls-files -z ../..`.split("\x0") | ||
paths = YAML.load_file("../../.github/workflows/bindings-ruby.yml")[true]["push"]["paths"] | ||
paths.delete "bindings/ruby/**" | ||
EXTSOURCES = (Dir.glob(paths, base: "../..").collect {|path| "../../#{path}"} << "../../LICENSE") & sources |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters