Skip to content

Add support for QPL 1.7.0 to misc codecs#1

Draft
mzhukova wants to merge 10 commits into
masterfrom
dev/mzhukova/add-qpl-v1.7
Draft

Add support for QPL 1.7.0 to misc codecs#1
mzhukova wants to merge 10 commits into
masterfrom
dev/mzhukova/add-qpl-v1.7

Conversation

@mzhukova
Copy link
Copy Markdown
Owner

@mzhukova mzhukova commented Apr 2, 2025

No description provided.

Copy link
Copy Markdown

@ElenaTyuleneva ElenaTyuleneva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot provide much valuable feedback for the qpl job submission part, but there are some comments from my side regarding the codec's integration in general.

A comment that is common to all changes: not all steps from CONTRIBUTING.md are done in the scope of these changes(e.g. CHANGELOG, Readme), but I suppose it will be done closer to the final version of the code.

Comment thread bench/codecs.h
#endif

#ifndef BENCH_REMOVE_QPL
char* lzbench_qpl_init(size_t insize, size_t, size_t);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understood from the function's definition, the last parameter(blocks_number) is actually used, so it may be useful to align the parameters naming in the definition and declaration just for the verbosity in both places.

Comment thread bench/misc_codecs.cpp
return outsize;
}

#endif // DBENCH_REMOVE_QPL
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#endif // DBENCH_REMOVE_QPL
#endif // BENCH_REMOVE_QPL

Comment thread bench/misc_codecs.cpp

qpl_compression_levels qpl_level = (codec_options->level == 3) ? qpl_high_level : qpl_default_level;

compress(ctx, in, insize, out, &outsize, qpl_level, false);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, this function should have a more qpl-specific name. To prevent overlapping with other functions in the benchmark that may be named this way. The same question is applicable for decompress()

Comment thread Makefile

misc/libqpl/qpl-wrappers/qpl_helper.o: misc/libqpl/qpl-wrappers/qpl_helper.cpp
@$(MKDIR) $(dir $@)
$(CXX) $(CFLAGS) -c $< -o $@
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we pass $(CXXFLAGS) here?

Comment thread Makefile
endif
endif # ifneq "$(LIBCUDART)"

HAS_CMAKE_NASM = $(shell command -v cmake >/dev/null 2>&1 && command -v nasm >/dev/null 2>&1 && echo 1 || echo 0)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double-checking: if the version of nasm or CMake is lower than required by qpl, it's expected that this error will be handled by qpl's build system?

Comment thread Makefile
$(CC) $(CFLAGS) -mavx $< -c -o $@

misc/libqpl/qpl/release/lib64/libqpl.a:
$(MKDIR) misc/libqpl/qpl/build && cmake -S misc/libqpl/qpl -B misc/libqpl/qpl/build -DCMAKE_BUILD_TYPE=Release -DQPL_BUILD_EXAMPLES=OFF -DQPL_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=misc/libqpl/qpl/release && make -C misc/libqpl/qpl/build install
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We potentially need to check if qpl's built-in flags don't contradict the statement from the main Readme:

"...This method provides the advantage of compiling all compressors with the same compiler and optimizations...."

or can just highlight that to lzbench owners and see their feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants