Skip to content

Fix rapidcheck#8

Merged
lockshaw merged 9 commits intolockshaw:pcg-serializationfrom
yingyee0111:fix-rapidcheck
May 26, 2024
Merged

Fix rapidcheck#8
lockshaw merged 9 commits intolockshaw:pcg-serializationfrom
yingyee0111:fix-rapidcheck

Conversation

@yingyee0111
Copy link

@yingyee0111 yingyee0111 commented May 9, 2024

Description of changes:
Enabled rapidcheck in opattrs

  • editted toml files
  • wrote custom arbitrary() for stack_vector, optional, variant, DimOrdered
  • wrote rc::checks to test rc::gen::arbitrary() for custom types
  • enabled rapidcheck for variant.toml specs, see notes below

NOTES

  • PR for proj repo should be merged in before this to recognize rapidcheck for variant specs.

Related Issues:

Linked Issues:

  • Issue #

Issues closed by this PR:

  • Closes #

Before merging:

  • Did you update the flexflow-third-party repo, if modifying any of the Cmake files, the build configs, or the submodules?

This change is Reviewable

@yingyee0111 yingyee0111 marked this pull request as ready for review May 12, 2024 04:39
Copy link
Owner

@lockshaw lockshaw left a comment

Choose a reason for hiding this comment

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

Reviewed 103 of 103 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @yingyee0111)


lib/op-attrs/include/op-attrs/operator_attrs.h line 34 at r1 (raw file):

#include "ops/topk.h"
#include "ops/transpose.h"
#include "utils/record_formatter.h"

Why?


lib/op-attrs/src/op-attrs/ff_dim.dtg.cc line 59 at r1 (raw file):

namespace rc {
Gen<FlexFlow::ff_dim_t> Arbitrary<FlexFlow::ff_dim_t>::arbitrary() {
  return gen::construct<FlexFlow::ff_dim_t>(gen::arbitrary<int>());

Should probably be constrained by MAX_TENSOR_DIM

Copy link
Owner

@lockshaw lockshaw left a comment

Choose a reason for hiding this comment

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

Reviewed 81 of 81 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @yingyee0111)


lib/op-attrs/src/op-attrs/computation_graph_op_attrs.dtg.cc line 404 at r2 (raw file):

                    gen::cast<::FlexFlow::ComputationGraphOpAttrs>(
                        gen::arbitrary<::FlexFlow::DropoutAttrs>()),
                    gen::cast<::FlexFlow::ComputationGraphOpAttrs>(

Why cast instead of construct?

@yingyee0111 yingyee0111 requested a review from lockshaw May 25, 2024 04:56
@lockshaw lockshaw merged commit a0c6c52 into lockshaw:pcg-serialization May 26, 2024
lockshaw added a commit that referenced this pull request Jun 4, 2024
)

* Add initial lib/substitution-generator and bin/substitutions-to-dot

* Format

* Update proj version and add .proj.toml file to repo directly

* Revert changes to flake.nix

* Prototype implementation of dtgen

* Refactor op-attrs to use dtgen

* Format

* More dtgen'ing

* Re-pass tests

* Simplify types in substitutions, more dtgen

* Add new reduction dim shape inference for conv2d

* Move conv2d input parsing into public headers

* Remove incorrect not_implemented

* Add pcg tests

* Add initial test for pcg

* Partial implementation of shape inference for linear

* Fix rapidcheck (#8)

* enable rapidchecks for op-attrs

* added rc::checks

* fix merge

* fixed variant toml

* revert proj.toml

* removed additional import merged

* constraint for ff_dim

* lock flake

---------

Co-authored-by: Rae Wong <raewong@sapling2.stanford.edu>

* Attempt to hide dtgen-generated files from github diff

* Fix header file name for dtgen in gitattributes

* Update proj and format code

* Add initial shape inference for BMM

* Add half of shape inference for Attention

* Finish initial shape inference for Attention

* Enable op-attrs and pcg tests in CI

* Add parallel shape inference for add and relu

* Add parallel shape inference for embedding

* Add shape inference for repartition, combine, replicate, and reduction

* Include tests for reduction

* Address wmdi comments

* Fixup linear shape inference, add tests for linear

* Fix tests

* Format

* Fix build errors

* change lcov in ci to rm dtgen coverage

* Remove dtgen from coverage

* Temporarily disable substitutions build in CI

* Format

* Fix substitution-generator build and tests

* Format

* fix ci coverage attempt

* second attempt

* small fix

* small fix

---------

Co-authored-by: Rae Wong <33883582+yingyee0111@users.noreply.github.com>
Co-authored-by: Rae Wong <raewong@sapling2.stanford.edu>
Co-authored-by: Qinghan Chen <qinghanc@andrew.cmu.edu>
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