Skip to content

Commit 6589e94

Browse files
authored
Merge pull request #9 from namtranase/dev
Dev
2 parents a1655d4 + edb2504 commit 6589e94

File tree

9 files changed

+310
-396
lines changed

9 files changed

+310
-396
lines changed

.clang-format

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Language: Cpp
2+
BasedOnStyle: Google

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,7 @@ cython_debug/
160160
#.idea/
161161

162162
# Vscode
163-
.vscode/
163+
.vscode/
164+
165+
#p Precommit
166+
.pre-commit-config.yaml

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
1111
FetchContent_Declare(sentencepiece GIT_REPOSITORY https://github.com/google/sentencepiece GIT_TAG 53de76561cfc149d3c01037f0595669ad32a5e7c)
1212
FetchContent_MakeAvailable(sentencepiece)
1313

14-
FetchContent_Declare(gemma GIT_REPOSITORY https://github.com/google/gemma.cpp GIT_TAG e29cd566cf3367671e8f59419a04e308796a7c57)
14+
FetchContent_Declare(gemma GIT_REPOSITORY https://github.com/google/gemma.cpp GIT_TAG 8fb44ed6dd123f63dca95c20c561e8ca1de511d7)
1515
FetchContent_MakeAvailable(gemma)
1616

1717
FetchContent_Declare(highway GIT_REPOSITORY https://github.com/google/highway.git GIT_TAG da250571a45826b21eebbddc1e50d0c1137dee5f)
@@ -30,3 +30,5 @@ FetchContent_GetProperties(gemma)
3030
FetchContent_GetProperties(sentencepiece)
3131
target_include_directories(pygemma PRIVATE ${gemma_SOURCE_DIR})
3232
target_include_directories(pygemma PRIVATE ${sentencepiece_SOURCE_DIR})
33+
target_compile_definitions(libgemma PRIVATE $<$<PLATFORM_ID:Windows>:_CRT_SECURE_NO_WARNINGS NOMINMAX>)
34+
target_compile_options(libgemma PRIVATE $<$<PLATFORM_ID:Windows>:-Wno-deprecated-declarations>)

DEVELOPERS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## 🤝 Contributing
2+
Contributions are welcome. Please clone the repository, push your changes to a new branch, and submit a pull request.

requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
pybind11
2-
pre-commit

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import sys
44
from setuptools import setup, find_packages, Extension
55
from setuptools.command.build_ext import build_ext
6+
import platform
67

78

89
class CMakeExtension(Extension):
@@ -39,7 +40,7 @@ def build_extension(self, ext):
3940
"--",
4041
"-j",
4142
"12",
42-
] # Specifies the number of jobs to run simultaneously
43+
]
4344

4445
if not os.path.exists(self.build_temp):
4546
os.makedirs(self.build_temp)
@@ -58,7 +59,7 @@ def build_extension(self, ext):
5859
version="0.1.2",
5960
author="Nam Tran",
6061
author_email="namtran.ase@gmail.com",
61-
description="A Python package with a C++ backend using gemma.",
62+
description="A Python package with a C++ backend using gemma.cpp",
6263
long_description="""
6364
This package provides Python bindings to a C++ library using pybind11.
6465
""",

0 commit comments

Comments
 (0)