Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop field dimension, support linear indexing and empty fields #1953

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

charleskawczynski
Copy link
Member

@charleskawczynski charleskawczynski commented Aug 23, 2024

This is an alternative to #1929. I opened this just to preserve the previous branch/PR for convenience. This branch is probably more matured.

This CPU tests are nearly fully passing.

Remaining issues / items to revisit

  • field_name now allocates
  • allowed_max_eps_error changes (perhaps just due to copied data?)
  • Remove field_array(array::AbstractArray, ::Type{T}) where {T <: AbstractData} if possible
  • Remove DataLayout singletons (for constructing FieldArrays) if possible
  • ) broken = Sys.iswindows() is this actually somehow fixed?
  • column_field2array_view cannot work but column_field2array is fine. (column_field2array_view is only used in the test dir)
  • Test cuda
  • Avoid collect in writers: array = collect(parent(field)) # TODO: avoid collect here
  • Revert to single_field_solver_cache(::UniformScaling, b) = similar(b, Tuple{}) if possible
  • Leave column_field2array_view and use copies in test suite
  • Equality of empty fields?
  • RecursiveApply on fieldvectors (test/Fields/unit_field.jl)
  • ForwardDiff support (test/Fields/unit_field.jl)
  • Review remapping changes (src/Operators/remapping.jl)

@charleskawczynski charleskawczynski marked this pull request as draft August 23, 2024 00:49
@charleskawczynski charleskawczynski force-pushed the ck/drop_field_dimension_support_empty_fields branch 4 times, most recently from 24ef689 to 52d84c0 Compare August 23, 2024 12:59
@charleskawczynski
Copy link
Member Author

Since they're working, here's the results for the CPU benchmarks:

                  Main                                  this PR
copyto! (DataF):  2 nanoseconds                     |   2 nanoseconds
copyto! (IJFH):   45 microseconds, 792 nanoseconds  |   14 microseconds, 333 nanoseconds
copyto! (IFH):    23 microseconds, 250 nanoseconds  |   3 microseconds, 510 nanoseconds
copyto! (VF):     8 nanoseconds                     |   7 nanoseconds
copyto! (VIJFH):  2 milliseconds, 219 microseconds  |   1 millisecond, 440 microseconds
copyto! (VIFH):   402 microseconds, 750 nanoseconds |   286 microseconds, 417 nanoseconds

for the following parameters:

FT = Float64
S = FT
Nf = 1
Nv = 63
Nij = 4
Nh = 30 * 30 * 6
Nk = 6

Some cuda benchmarks are already summarized in #1910 and here

@charleskawczynski charleskawczynski force-pushed the ck/drop_field_dimension_support_empty_fields branch 5 times, most recently from a0786fc to c7fe195 Compare August 23, 2024 17:39
@charleskawczynski charleskawczynski force-pushed the ck/drop_field_dimension_support_empty_fields branch 6 times, most recently from 9ba577b to dd7218d Compare September 3, 2024 01:47
Rename TupleOfArrays to FieldArrays

Apply formatter

wip

Pass some unit tests, cleanup

wip

wip

wip

Apply formatter
@charleskawczynski charleskawczynski force-pushed the ck/drop_field_dimension_support_empty_fields branch from dd7218d to a254113 Compare September 9, 2024 20:34
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.

1 participant