Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn committed Jan 26, 2024
1 parent 0d02ce0 commit e0fcc1c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 57 deletions.
6 changes: 3 additions & 3 deletions cmake/onnxruntime_unittests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -923,13 +923,13 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
if (onnxruntime_USE_JSEP)
set_property(TARGET onnxruntime_test_all APPEND_STRING PROPERTY LINK_FLAGS " --pre-js \"${ONNXRUNTIME_ROOT}/wasm/js_internal_api.js\"")
endif()

target_compile_options(onnxruntime_test_all PRIVATE -ggdb3)
###
### if you want to investigate or debug a test failure in onnxruntime_test_all, replace the following line.
### those flags slow down the CI test significantly, so we don't use them by default.
###
# set_property(TARGET onnxruntime_test_all APPEND_STRING PROPERTY LINK_FLAGS " -s ASSERTIONS=2 -s SAFE_HEAP=1 -s STACK_OVERFLOW_CHECK=2")
set_property(TARGET onnxruntime_test_all APPEND_STRING PROPERTY LINK_FLAGS " -s ASSERTIONS=0 -s SAFE_HEAP=0 -s STACK_OVERFLOW_CHECK=1")
set_property(TARGET onnxruntime_test_all APPEND_STRING PROPERTY LINK_FLAGS " -s ASSERTIONS=2 -s SAFE_HEAP=1 -s STACK_OVERFLOW_CHECK=2")
#set_property(TARGET onnxruntime_test_all APPEND_STRING PROPERTY LINK_FLAGS " -s ASSERTIONS=0 -s SAFE_HEAP=0 -s STACK_OVERFLOW_CHECK=1")
endif()

if (onnxruntime_ENABLE_ATEN)
Expand Down
12 changes: 6 additions & 6 deletions onnxruntime/test/unittest_main/test_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ auto const placeholder = std::unique_ptr<nvinfer1::IBuilder>(nvinfer1::createInf

std::unique_ptr<Ort::Env> ort_env;
static onnxruntime::Status ortenv_setup() {
emscripten_log(EM_LOG_INFO,"XXXXXXXXXXXXXXXXXXXX:ortenv_setup start\n");
printf("XXXXXXXXXXXXXXXXXXXX:ortenv_setup start\n");
OrtThreadingOptions tpo;

onnxruntime::Status status;
Expand All @@ -74,7 +74,7 @@ static onnxruntime::Status ortenv_setup() {
ORT_RETURN_IF_ERROR(onnxruntime::Environment::Create(std::move(lmgr), env, &tpo, true));
std::unique_ptr<OrtEnv> env2=std::make_unique<OrtEnv>(std::move(env));
ort_env = std::make_unique<Ort::Env>(env2.release());
emscripten_log(EM_LOG_INFO,"XXXXXXXXXXXXXXXXXXXX:ortenv_setup end\n");
printf("XXXXXXXXXXXXXXXXXXXX:ortenv_setup end\n");
return status;
}

Expand All @@ -94,10 +94,10 @@ struct EmState {
};

void MainLoop(void* arg) {
emscripten_log(EM_LOG_INFO, "Entering MainLoop ...\n");
printf( "Entering MainLoop ...\n");
if (arg == nullptr) return;
EmState& state = *(EmState*)arg;
emscripten_log(EM_LOG_INFO, "stage %d ...\n", (int)state.stage);
printf( "stage %d ...\n", (int)state.stage);
onnxruntime::Status status;
switch (state.stage) {
case EmStage::INIT: {
Expand All @@ -118,12 +118,12 @@ void MainLoop(void* arg) {
state.stage = EmStage::FINI;
break;
default:
emscripten_log(EM_LOG_INFO, "Release ORT Env\n");
printf( "Release ORT Env\n");
ort_env.reset();
emscripten_cancel_main_loop();
break;
}
emscripten_log(EM_LOG_INFO, "Exiting MainLoop ...\n");
printf( "Exiting MainLoop ...\n");
return;
}

Expand Down
13 changes: 0 additions & 13 deletions tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,6 @@ jobs:
displayName: 'Clean Agent Directories'
condition: always()
- checkout: self
- task: DownloadPipelineArtifact@2
inputs:
artifact: '__commit'
path: $(Pipeline.Workspace)
displayName: 'Get commit SHA'
condition: eq('${{ parameters.CommitOverride }}', 'true')
- script: |
export __commit__=<$(Pipeline.Workspace)/__commit.txt
git fetch origin +$__commit__:refs/remotes/origin/$__commit__
git checkout --force $__commit__
workingDirectory: '$(Build.SourcesDirectory)'
displayName: 'Read commit SHA and checkout'
condition: eq('${{ parameters.CommitOverride }}', 'true')
- script: |
git submodule sync --recursive
git submodule update --init --recursive
Expand Down
35 changes: 0 additions & 35 deletions tools/ci_build/github/azure-pipelines/templates/web-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,42 +54,7 @@ parameters:
default: false

stages:
- stage: Precheck_and_extract_commit
jobs:
- job: Precheck_and_extract_commit
pool: ${{ parameters.PoolName }}
variables:
runCodesignValidationInjection: false
timeoutInMinutes: 30
workspace:
clean: all
steps:
- checkout: self
submodules: false
- script: |
git submodule sync -- cmake/external/onnx
git submodule update --init -- cmake/external/onnx
workingDirectory: '$(Build.SourcesDirectory)'
displayName: 'Checkout submodule onnx'
- task: NodeTool@0
inputs:
versionSpec: '18.x'
- template: linux-web-init-and-check.yml
- task: Bash@3
displayName: 'Extract commit SHA and save to __commit.txt'
inputs:
targetType: 'inline'
script: |
echo $(Build.SourceVersion)
echo $(Build.SourceVersion) > "$(Build.ArtifactStagingDirectory)"/__commit.txt
- task: PublishPipelineArtifact@0
displayName: 'Publish __commit.txt'
inputs:
artifactName: '__commit'
targetPath: '$(Build.ArtifactStagingDirectory)'

- stage: Build_wasm_Debug
dependsOn: Precheck_and_extract_commit
jobs:
- template: ${{ parameters.WASMTemplate }}
parameters:
Expand Down

0 comments on commit e0fcc1c

Please sign in to comment.