Skip to content

Commit 555ee5f

Browse files
authored
Add subquadratic-ops support (#1043)
### Description <!-- Provide a detailed description of the changes in this PR --> ### Type of changes <!-- Mark the relevant option with an [x] --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Refactor - [ ] Documentation update - [ ] Other (please describe): ### CI Pipeline Configuration Configure CI behavior by applying the relevant labels: - [SKIP_CI](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#skip_ci) - Skip all continuous integration tests - [INCLUDE_NOTEBOOKS_TESTS](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#include_notebooks_tests) - Execute notebook validation tests in pytest - [INCLUDE_SLOW_TESTS](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#include_slow_tests) - Execute tests labelled as slow in pytest for extensive testing > \[!NOTE\] > By default, the notebooks validation tests are skipped unless explicitly enabled. #### Authorizing CI Runs We use [copy-pr-bot](https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/#automation) to manage authorization of CI runs on NVIDIA's compute resources. - If a pull request is opened by a trusted user and contains only trusted changes, the pull request's code will automatically be copied to a pull-request/ prefixed branch in the source repository (e.g. pull-request/123) - If a pull request is opened by an untrusted user or contains untrusted changes, an NVIDIA org member must leave an `/ok to test` comment on the pull request to trigger CI. This will need to be done for each new commit. ### Usage <!--- How does a user interact with the changed code --> ```python # TODO: Add code snippet ``` ### Pre-submit Checklist <!--- Ensure all items are completed before submitting --> - [ ] I have tested these changes locally - [ ] I have updated the documentation accordingly - [ ] I have added/updated tests as needed - [ ] All existing tests pass successfully --------- Signed-off-by: Farhad Ramezanghorbani <farhadr@nvidia.com>
1 parent db065c1 commit 555ee5f

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

3rdparty/NeMo

Submodule NeMo updated from ee0be11 to f4f22a2

ci/benchmarks/partial-conv/evo2_pretrain.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ script_args:
1616
workspace: /workspace/bionemo2
1717
data_path: /data/evo2
1818
artefacts_url: https://__token__:${JET_GITLAB_TOKEN}@gitlab-master.nvidia.com/api/v4/projects/180496/packages/pypi/simple
19-
file_name_wheel: cuhyena==v0.2.3+cuda12.9
19+
file_name_wheel: subquadratic-ops
2020
model: evo2
2121
variant: train
2222
config_name: 1b
@@ -55,7 +55,7 @@ script: |-
5555
--enable-preemption \
5656
--ckpt-async-save \
5757
--use-megatron-comm-overlap-llama3-8k \
58-
--use-b2b-causal-conv1d \
58+
--use-subquadratic_ops \
5959
--overlap-grad-reduce \
6060
--clip-grad=${clip_grad} \
6161
--eod-pad-in-loss-mask \
@@ -78,7 +78,7 @@ script: |-
7878
--limit-val-batches=20 \
7979
--log-every-n-steps=50 \
8080
--val-check-interval=500 \
81-
--use-b2b-causal-conv1d \
81+
--use-subquadratic_ops \
8282
--create-tflops-callback \
8383
--create-tensorboard-logger \
8484
--result-dir=${tensorboard_dir} \

ci/benchmarks/perf/evo2_pretrain.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ script: |-
7676
--limit-val-batches=20 \
7777
--log-every-n-steps=50 \
7878
--val-check-interval=200 \
79-
--use-b2b-causal-conv1d \
79+
--use-subquadratic_ops \
8080
--create-tflops-callback \
8181
--create-tensorboard-logger \
8282
--result-dir=${tensorboard_dir} \

sub-packages/bionemo-evo2/src/bionemo/evo2/run/train.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,9 @@ def parse_args(args: Optional[List[str]] = None) -> argparse.Namespace:
462462
help="Dropout probability for the attention layers.",
463463
)
464464
parser.add_argument(
465-
"--use-b2b-causal-conv1d",
465+
"--use-subquadratic_ops",
466466
action="store_true",
467-
help="Use back-to-back causal convolution CUDA kernel for hyena short conv layers for improved performance.",
467+
help="Use subquadratic_ops for improved performance.",
468468
)
469469
parser.add_argument(
470470
"--save-top-k",
@@ -597,8 +597,8 @@ def train(args: argparse.Namespace) -> nl.Trainer:
597597
config_modifiers_init["ffn_hidden_size"] = args.ffn_hidden_size
598598
if args.use_targeted_variance_loss:
599599
config_modifiers_init["use_targeted_variance_loss"] = True
600-
if args.use_b2b_causal_conv1d:
601-
config_modifiers_init["use_b2b_causal_conv1d"] = True
600+
if args.use_subquadratic_ops:
601+
config_modifiers_init["use_subquadratic_ops"] = True
602602
if args.hybrid_override_pattern:
603603
config_modifiers_init["hybrid_override_pattern"] = args.hybrid_override_pattern
604604
if args.num_layers:

0 commit comments

Comments
 (0)