Skip to content

Commit

Permalink
whisper : revert mel-related changes (#0)
Browse files Browse the repository at this point in the history
too much extra logic and complexity for small benefit
  • Loading branch information
ggerganov committed Oct 5, 2024
1 parent 9419124 commit 396089f
Show file tree
Hide file tree
Showing 8 changed files with 134 additions and 667 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
.DS_Store
.vimspector.json
/CMakeSettings.json
/talk-llama.dSYM/

build/
build-*/
Expand Down
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,6 @@ ifdef GGML_CUDA
OBJ_GGML += ggml/src/ggml-cuda.o
OBJ_GGML += $(patsubst %.cu,%.o,$(wildcard ggml/src/ggml-cuda/*.cu))
OBJ_GGML += $(OBJ_CUDA_TMPL)

#OBJ_WHISPER += src/whisper-mel-cuda.o

ifdef WHISPER_FATAL_WARNINGS
MK_NVCCFLAGS += -Werror all-warnings
endif # WHISPER_FATAL_WARNINGS
Expand Down Expand Up @@ -623,10 +620,6 @@ ggml/src/ggml-cuda.o: \
ggml/src/ggml-common.h \
$(wildcard ggml/src/ggml-cuda/*.cuh)
$(NVCC_COMPILE)

#src/whisper-mel-cuda.o: src/whisper-mel-cuda.cu src/whisper-mel-cuda.hpp
# $(NVCC) $(NVCCFLAGS) $(CPPFLAGS) -Xcompiler "$(CUDA_CXXFLAGS)" -c $< -o $@

endif # GGML_CUDA

ifdef GGML_VULKAN
Expand Down Expand Up @@ -955,7 +948,6 @@ $(LIB_GGML_S): \

src/whisper.o: \
src/whisper.cpp \
src/whisper-mel.hpp \
include/whisper.h \
ggml/include/ggml.h \
ggml/include/ggml-alloc.h \
Expand Down
1 change: 0 additions & 1 deletion bindings/ruby/ext/extconf.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
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__),'..','..','..','whisper-mel.hpp')} .")
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')} .")
Expand Down
30 changes: 0 additions & 30 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,43 +78,13 @@ if (WHISPER_OPENVINO)
set_target_properties(${TARGET} PROPERTIES FOLDER "libs")
endif()

#if (GGML_CUDA)
# cmake_minimum_required(VERSION 3.18) # for CMAKE_CUDA_ARCHITECTURES
#
# find_package(CUDAToolkit)
# if (CUDAToolkit_FOUND)
# message(STATUS "CUDA found")
#
# if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
# # 52 == lowest CUDA 12 standard
# # 60 == f16 CUDA intrinsics
# # 61 == integer CUDA intrinsics
# # 70 == compute capability at which unrolling a loop in mul_mat_q kernels is faster
# set(CMAKE_CUDA_ARCHITECTURES "52;61;70") # lowest CUDA 12 standard + lowest for integer intrinsics
# endif()
# message(STATUS "Using CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
#
# enable_language(CUDA)
# else()
# message(WARNING "CUDA not found")
# endif()
#endif()

# whisper

add_library(whisper
../include/whisper.h
whisper.cpp
whisper-mel.hpp
)

# TODO: disabled because it relies on ggml internals that are no longer accessible (ggml-backend-impl.h, ggml-cuda/common.cuh, ..)
#if (GGML_CUDA)
# target_sources(whisper PRIVATE whisper-mel-cuda.cu)
#
# target_link_libraries(whisper PRIVATE CUDA::cufft)
#endif()

# Set the version numbers
set_target_properties(whisper PROPERTIES
VERSION ${PROJECT_VERSION}
Expand Down
Loading

0 comments on commit 396089f

Please sign in to comment.