Skip to content

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

Closed
charleskawczynski wants to merge 3 commits into
mainfrom
ck/drop_field_dimension_support_empty_fields
Closed

Drop field dimension, support linear indexing and empty fields#1953
charleskawczynski wants to merge 3 commits into
mainfrom
ck/drop_field_dimension_support_empty_fields

Conversation

@charleskawczynski

@charleskawczynski charleskawczynski commented Aug 23, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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
@charleskawczynski

Copy link
Copy Markdown
Contributor Author

Superseded by #2055.

@charleskawczynski
charleskawczynski deleted the ck/drop_field_dimension_support_empty_fields branch April 27, 2025 18:33
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