You've already forked pgvecto.rs
mirror of
https://github.com/tensorchord/pgvecto.rs.git
synced 2025-08-01 06:46:52 +03:00
feat: fp16 vector (#178)
* feat: fp16 vector Signed-off-by: usamoi <usamoi@outlook.com> * feat: detect avx512fp16 Signed-off-by: usamoi <usamoi@outlook.com> * fix: install clang-16 for ci Signed-off-by: usamoi <usamoi@outlook.com> * fix: clippy Signed-off-by: usamoi <usamoi@outlook.com> * fix: rename c to pgvectorsc Signed-off-by: usamoi <usamoi@outlook.com> * feat: hand-writing avx512fp16 Signed-off-by: usamoi <usamoi@outlook.com> * fix: index on fp16 Signed-off-by: usamoi <usamoi@outlook.com> * feat: hand-writing avx2 Signed-off-by: usamoi <usamoi@outlook.com> * fix: clippy Signed-off-by: usamoi <usamoi@outlook.com> * fix: add rerun in build script Signed-off-by: usamoi <usamoi@outlook.com> * fix: cross compilation Signed-off-by: usamoi <usamoi@outlook.com> * fix: do not leave uninitialized bytes in datatype input function Signed-off-by: usamoi <usamoi@outlook.com> * fix: compiler built-in function calling convention workaround Signed-off-by: usamoi <usamoi@outlook.com> * fix: cross compile on aarch64 Signed-off-by: usamoi <usamoi@outlook.com> * fix: fix detect avx512fp16 Signed-off-by: usamoi <usamoi@outlook.com> * fix: avx512 codegen by multiversion Signed-off-by: usamoi <usamoi@outlook.com> * fix: enable more target features for c Signed-off-by: usamoi <usamoi@outlook.com> * fix: use tensorchord/stdarch Signed-off-by: usamoi <usamoi@outlook.com> * fix: ci Signed-off-by: usamoi <usamoi@outlook.com> * fix: remove no-run cross test Signed-off-by: usamoi <usamoi@outlook.com> * fix: vbase Signed-off-by: usamoi <usamoi@outlook.com> * fix: error and document Signed-off-by: usamoi <usamoi@outlook.com> * [skip ci] Signed-off-by: usamoi <usamoi@outlook.com> --------- Signed-off-by: usamoi <usamoi@outlook.com>
This commit is contained in:
@ -19,14 +19,12 @@ URL = f"postgresql://{USER}:{PASS}@{HOST}:{PORT}/{DB_NAME}"
|
||||
TOML_SETTINGS = {
|
||||
"flat": toml.dumps(
|
||||
{
|
||||
"capacity": 2097152,
|
||||
"algorithm": {"flat": {}},
|
||||
"indexing": {"flat": {}},
|
||||
},
|
||||
),
|
||||
"hnsw": toml.dumps(
|
||||
{
|
||||
"capacity": 2097152,
|
||||
"algorithm": {"hnsw": {}},
|
||||
"indexing": {"hnsw": {}},
|
||||
},
|
||||
),
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ def conn():
|
||||
@pytest.mark.parametrize(("index_name", "index_setting"), TOML_SETTINGS.items())
|
||||
def test_create_index(conn: Connection, index_name: str, index_setting: str):
|
||||
stat = sql.SQL(
|
||||
"CREATE INDEX {} ON tb_test_item USING vectors (embedding l2_ops) WITH (options={});",
|
||||
"CREATE INDEX {} ON tb_test_item USING vectors (embedding vector_l2_ops) WITH (options={});",
|
||||
).format(sql.Identifier(index_name), index_setting)
|
||||
|
||||
conn.execute(stat)
|
||||
|
@ -68,7 +68,7 @@ def test_create_index(session: Session, index_name: str, index_setting: str):
|
||||
Document.embedding,
|
||||
postgresql_using="vectors",
|
||||
postgresql_with={"options": f"$${index_setting}$$"},
|
||||
postgresql_ops={"embedding": "l2_ops"},
|
||||
postgresql_ops={"embedding": "vector_l2_ops"},
|
||||
)
|
||||
index.create(session.bind)
|
||||
session.commit()
|
||||
|
Reference in New Issue
Block a user