Skip to content

Commit b046f0c

Browse files
committed
test
ggml-ci
1 parent bf45300 commit b046f0c

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,7 @@ jobs:
777777
cmake -S . -B build ${{ matrix.defines }} `
778778
-DCURL_LIBRARY="$env:CURL_PATH/lib/libcurl.dll.a" -DCURL_INCLUDE_DIR="$env:CURL_PATH/include"
779779
cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS}
780+
cp $env:CURL_PATH/bin/libcurl-*.dll build/bin/Release
780781
781782
- name: Add libopenblas.dll
782783
id: add_libopenblas_dll

common/common.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,9 @@ bool fs_validate_filename(const std::string & filename) {
767767
return true;
768768
}
769769

770+
#include <iostream>
771+
772+
770773
// returns true if successful, false otherwise
771774
bool fs_create_directory_with_parents(const std::string & path) {
772775
#ifdef _WIN32
@@ -784,11 +787,18 @@ bool fs_create_directory_with_parents(const std::string & path) {
784787
// process path from front to back, procedurally creating directories
785788
while ((pos_slash = path.find('\\', pos_slash)) != std::string::npos) {
786789
const std::wstring subpath = wpath.substr(0, pos_slash);
787-
const wchar_t * test = subpath.c_str();
790+
pos_slash += 1;
791+
// skip the drive letter, in some systems it can return an access denied error
792+
if (subpath.length() == 2 && subpath[1] == ':') {
793+
continue;
794+
}
795+
796+
const bool success = CreateDirectoryW(subpath.c_str(), NULL);
788797

789-
const bool success = CreateDirectoryW(test, NULL);
798+
std::wcout << "CreateDirectoryW " << subpath << " returned: " << (success ? "true" : "false") << std::endl;
790799
if (!success) {
791800
const DWORD error = GetLastError();
801+
std::wcout << "GetLastError returned: " << error << std::endl;
792802

793803
// if the path already exists, ensure that it's a directory
794804
if (error == ERROR_ALREADY_EXISTS) {
@@ -800,8 +810,6 @@ bool fs_create_directory_with_parents(const std::string & path) {
800810
return false;
801811
}
802812
}
803-
804-
pos_slash += 1;
805813
}
806814

807815
return true;

tests/test-thread-safety.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ int main(int argc, char ** argv) {
2424
llama_backend_init();
2525
llama_numa_init(params.numa);
2626

27-
llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) {
28-
if (level == GGML_LOG_LEVEL_ERROR) {
29-
common_log_add(common_log_main(), level, "%s", text);
30-
}
31-
}, NULL);
27+
LOG_INF("%s\n", common_params_get_system_info(params).c_str());
28+
29+
//llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) {
30+
// if (level == GGML_LOG_LEVEL_ERROR) {
31+
// common_log_add(common_log_main(), level, "%s", text);
32+
// }
33+
//}, NULL);
3234

3335
auto mparams = common_model_params_to_llama(params);
3436
auto cparams = common_context_params_to_llama(params);

0 commit comments

Comments
 (0)