Skip to content

Commit aba852f

Browse files
committed
debug
1 parent 8a98867 commit aba852f

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

examples/qualcomm/oss_scripts/llama/runner/runner.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ namespace example {
3434

3535
namespace {
3636
static constexpr auto kTopp = 0.9f;
37-
void printReport(const Runner::Stats& stats, const std::string& performance_output_path);
37+
void printReport(
38+
const Runner::Stats& stats,
39+
const std::string& performance_output_path);
3840
std::string statsToJsonString(const Runner::Stats& stats);
3941
} // namespace
4042

@@ -463,7 +465,9 @@ Error Runner::generate(
463465
}
464466

465467
namespace {
466-
void printReport(const Runner::Stats& stats, const std::string& performance_output_path) {
468+
void printReport(
469+
const Runner::Stats& stats,
470+
const std::string& performance_output_path) {
467471
printf("PyTorchObserver %s\n", statsToJsonString(stats).c_str());
468472

469473
ET_LOG(
@@ -524,7 +528,7 @@ void printReport(const Runner::Stats& stats, const std::string& performance_outp
524528

525529
// For now, we just print the total inference time for CI, can save more info
526530
// in future if needed.
527-
531+
528532
std::ofstream outfile(performance_output_path.c_str());
529533
if (outfile.is_open()) {
530534
double num_tok = (stats.num_generated_tokens) /

examples/qualcomm/scripts/mobilebert_fine_tune.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def get_fine_tuned_mobilebert(artifacts_dir, pretrained_weight, batch_size):
169169
dataset_train = TensorDataset(input_ids_train, attention_masks_train, labels_train)
170170
dataset_val = TensorDataset(input_ids_val, attention_masks_val, labels_val)
171171

172-
epochs = 1 # Revert this later
172+
epochs = 1 # Revert this later
173173
dataloader_train = DataLoader(
174174
dataset_train,
175175
sampler=RandomSampler(dataset_train),

examples/qualcomm/scripts/wav2letter.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ def collate_fun(batch):
6767
)
6868
# prepare input data
6969
inputs, targets, input_list = [], [], ""
70+
import logging
71+
import torchaudio
72+
logging.warning(f"Checking available backends: ", torchaudio.list_audio_backends())
7073
for wave, label in data_loader:
7174
for index in range(data_size):
7275
# reshape input tensor to NCHW

install_requirements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def install_requirements(use_pytorch_nightly):
8585
]
8686

8787
EXAMPLES_REQUIREMENTS = [
88-
f"torchaudio==2.6.0.{NIGHTLY_VERSION}" if use_pytorch_nightly else "torchaudio",
88+
f"torchaudio==2.6.0.{NIGHTLY_VERSION}",
8989
]
9090

9191
# Assemble the list of requirements to actually install.

0 commit comments

Comments
 (0)